Skip to content
Myr

Updated a comment that was misleading with recent flask sqlalchemy installations

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent f34c028 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:flask/ctx.py+3 added-2 removed
211 unmodified lines
212 # activated under exception situations exactly one context stays213 # on the stack. The rationale is that you want to access that214 # information under debug situations. However if someone forgets to215 # pop that context again we want to make sure that on the next push216 # it's invalidated otherwise we run at risk that something leaks216 # it's invalidated, otherwise we run at risk that something leaks217 # memory. This is usually only a problem in testsuite since this218 # functionality is not active in production environments.219 top = _request_ctx_stack.top220 if top is not None and top.preserved:
12 unmodified lines
233 _request_ctx_stack.push(self)234235 # Open the session at the moment that the request context is236 # available. This allows a custom open_session method to use the237 # request context (e.g. flask-sqlalchemy).237 # request context (e.g. code that access database information238 # stored on `g` instead of the appcontext).239 self.session = self.app.open_session(self.request)240 if self.session is None:241 self.session = self.app.make_null_session()242
54 unmodified lines