Re: [Django] #14894: translation is not threadsafe

2013-05-18 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:
 Type:  Bug  |  sergeykolosov
Component:   |   Status:  closed
  Internationalization   |  Version:  1.4
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  threadsafety | Triage Stage:  Accepted
  translation|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by Florian Apolloner ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"acd0bb39df5c9ca486e49ec55ae34538242ce071"]:
 {{{
 #!CommitTicketReference repository=""
 revision="acd0bb39df5c9ca486e49ec55ae34538242ce071"
 Fixed #14894 -- Ensure that activating a translation doesn't run into
 threading issues.

 Thanks to maxbublis for the report and sergeykolosov for the patch.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2013-05-18 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:
 Type:  Bug  |  sergeykolosov
Component:   |   Status:  assigned
  Internationalization   |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  threadsafety | Triage Stage:  Accepted
  translation|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by sergeykolosov):

 * status:  new => assigned
 * owner:  nobody => sergeykolosov


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2013-03-11 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.4
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  threadsafety |  Needs documentation:  0
  translation|  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  1|
Easy pickings:  0|
-+-
Changes (by aaugustin):

 * component:  Core (Other) => Internationalization


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2012-10-18 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  threadsafety | Triage Stage:  Accepted
  translation|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by claudep):

 * needs_better_patch:  0 => 1


Comment:

 I think the easier fix would be to iterate on _translations.keys(). No
 risk of overloading memory with languages codes. Properly testing this
 might be hard.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2012-10-18 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  threadsafety | Triage Stage:  Accepted
  translation|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by acdha):

 * version:  1.2 => 1.4


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2012-10-18 Thread Django
#14894: translation is not threadsafe
-+-
 Reporter:  maxbublis|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  1.2
 Severity:  Normal   |   Resolution:
 Keywords:  threadsafety | Triage Stage:  Accepted
  translation|  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by acdha):

 * cc: chris@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #14894: translation is not threadsafe

2011-04-04 Thread Django
#14894: translation is not threadsafe
-+-
   Reporter:  maxbublis  |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone: |Component:  Core (Other)
Version:  1.2| Severity:  Normal
 Resolution: | Keywords:  threadsafety
   Triage Stage:  Accepted   |  translation
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  1
-+-
Changes (by jaddison):

 * milestone:  1.3 =>


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-04-03 Thread Django
#14894: translation is not threadsafe
-+-
   Reporter:  maxbublis  |Owner:  nobody
   Type:  Bug|   Status:  new
  Milestone:  1.3|Component:  Core (Other)
Version:  1.2| Severity:  Normal
 Resolution: | Keywords:  threadsafety
   Triage Stage:  Accepted   |  translation
Needs documentation:  0  |Has patch:  1
Patch needs improvement:  0  |  Needs tests:  1
-+-
Changes (by julien):

 * type:   => Bug
 * severity:   => Normal
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-03-10 Thread Django
#14894: translation is not threadsafe
-+-
   Reporter:  maxbublis  |Owner:  nobody
 Status:  new|Milestone:  1.3
  Component:  Core   |  Version:  1.2
  framework  | Keywords:  threadsafety
 Resolution: |  translation
   Triage Stage: |Has patch:  1
  Unreviewed |  Needs tests:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by bberes):

 * cc: botondus@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-02-10 Thread Django
#14894: translation is not threadsafe
--+-
   Reporter:  maxbublis   | Owner:  nobody  

 Status:  new | Milestone:  1.3 

  Component:  Core framework  |   Version:  1.2 

 Resolution:  |  Keywords:  threadsafety 
translation
   Triage Stage:  Unreviewed  | Has patch:  1   

Needs documentation:  0   |   Needs tests:  1   

Patch needs improvement:  0   |  
--+-

Comment (by maxbublis):

 Trunk codebase has been slightly changed during past 2 months.
 Iteration over _translations dictionary now is located in
 
[http://code.djangoproject.com/browser/django/trunk/django/utils/translation/trans_real.py#L149
 149 line]
 Changing _translations dictionary now is located in
 
[http://code.djangoproject.com/browser/django/trunk/django/utils/translation/trans_real.py#L181
 181 line]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-02-10 Thread Django
#14894: translation is not threadsafe
--+-
   Reporter:  maxbublis   | Owner:  nobody  

 Status:  new | Milestone:  1.3 

  Component:  Core framework  |   Version:  1.2 

 Resolution:  |  Keywords:  threadsafety 
translation
   Triage Stage:  Unreviewed  | Has patch:  1   

Needs documentation:  0   |   Needs tests:  1   

Patch needs improvement:  0   |  
--+-
Changes (by jezdez):

  * stage:  Accepted => Unreviewed


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-02-10 Thread Django
#14894: translation is not threadsafe
--+-
   Reporter:  maxbublis   | Owner:  nobody  

 Status:  new | Milestone:  1.3 

  Component:  Core framework  |   Version:  1.2 

 Resolution:  |  Keywords:  threadsafety 
translation
   Triage Stage:  Accepted| Has patch:  1   

Needs documentation:  0   |   Needs tests:  1   

Patch needs improvement:  0   |  
--+-
Changes (by jezdez):

  * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2011-02-10 Thread Django
#14894: translation is not threadsafe
--+-
   Reporter:  maxbublis   | Owner:  nobody  

 Status:  new | Milestone:  1.3 

  Component:  Core framework  |   Version:  1.2 

 Resolution:  |  Keywords:  threadsafety 
translation
   Triage Stage:  Accepted| Has patch:  1   

Needs documentation:  0   |   Needs tests:  0   

Patch needs improvement:  0   |  
--+-

Comment (by maxbublis):

 What about progressing this ticket to "Ready For Checkin" state?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14894: translation is not threadsafe

2010-12-13 Thread Django
#14894: translation is not threadsafe
-+--
  Reporter:  maxbublis   | Owner:  nobody  
Status:  new | Milestone:  1.3 
 Component:  Core framework  |   Version:  1.2 
Resolution:  |  Keywords:  threadsafety translation
 Stage:  Accepted| Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by jezdez):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #14894: translation is not threadsafe

2010-12-13 Thread Django
#14894: translation is not threadsafe
--+-
 Reporter:  maxbublis |   Owner:  nobody
   Status:  new   |   Milestone:  1.3   
Component:  Core framework| Version:  1.2   
 Keywords:  threadsafety translation  |   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 I've got the following error in my multithreading application:
 {{{
 Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-
 packages/django/core/handlers/base.py", line 80, in get_response
response = middleware_method(request)
  File "/usr/local/lib/python2.6/site-
 packages/django/middleware/locale.py", line 17, in process_request
translation.activate(language)
  File "/usr/local/lib/python2.6/site-
 packages/django/utils/translation/__init__.py", line 66, in activate
return real_activate(language)
  File "/usr/local/lib/python2.6/site-packages/django/utils/functional.py",
 line 55, in _curried
return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/usr/local/lib/python2.6/site-
 packages/django/utils/translation/__init__.py", line 36, in delayed_loader
return getattr(trans, real_name)(*args, **kwargs)
  File "/usr/local/lib/python2.6/site-
 packages/django/utils/translation/trans_real.py", line 193, in activate
_active[currentThread()] = translation(language)
  File "/usr/local/lib/python2.6/site-
 packages/django/utils/translation/trans_real.py", line 177, in translation
current_translation = _fetch(language, fallback=default_translation)
  File "/usr/local/lib/python2.6/site-
 packages/django/utils/translation/trans_real.py", line 141, in _fetch
if base_lang(lang) in [base_lang(trans) for trans in _translations]:

 RuntimeError: dictionary changed size during iteration
 }}}

 The reason is not threadsafe global _translations dictionary in
 django.utils.translation.trans_real module. In one thread you could
 iterate
 
[http://code.djangoproject.com/browser/django/trunk/django/utils/translation/trans_real.py#L148
 over it] and change it
 
[http://code.djangoproject.com/browser/django/trunk/django/utils/translation/trans_real.py#L180
 in another one], that could lead to the above RuntimeError.

 Patch attached.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.