Flawed context managers are `django.utils.translation.override` (which
leads to a bug following the use of `ContextDecorator`) and
`django.utils.timezone.override`. The pull request below fix them both and
updates a test to demonstrate the failure with
`django.utils.translation.override`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23381>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Here is the pull request https://github.com/django/django/pull/3135
--
Ticket URL: <https://code.djangoproject.com/ticket/23381#comment:1>
* component: Uncategorized => Utilities
* needs_better_patch: 0 => 1
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
Comment:
Good catch. See my comments on the pull request. If you're not sure how to
write the tests, let me know, I can take care of that part.
--
Ticket URL: <https://code.djangoproject.com/ticket/23381#comment:2>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
Comment:
Updated PR looks good.
--
Ticket URL: <https://code.djangoproject.com/ticket/23381#comment:3>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"efcbf3e095dce3491eb52774978afe3f7bbdf217"]:
{{{
#!CommitTicketReference repository=""
revision="efcbf3e095dce3491eb52774978afe3f7bbdf217"
Fixed #23381 -- Context manager restored state should be determined in
__enter__
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23381#comment:4>