Break up a circular dependency on shutdown
This commit is contained in:
parent
11c7b1df23
commit
7f4c12b335
3 changed files with 93 additions and 0 deletions
|
|
@ -150,6 +150,10 @@ class RequestContext(object):
|
|||
assert rv is self, 'Popped wrong request context. (%r instead of %r)' \
|
||||
% (rv, self)
|
||||
|
||||
# get rid of circular dependencies at the end of the request
|
||||
# so that we don't require the GC to be active.
|
||||
rv.request.environ['werkzeug.request'] = None
|
||||
|
||||
def __enter__(self):
|
||||
self.push()
|
||||
return self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue