David Lord
2411707492
rework context docs
2018-04-09 00:02:38 -07:00
David Lord
310fbfcf64
revert copyright year to project start
...
add copyright header to files
2018-02-08 12:43:30 -08:00
David Lord
6637e20174
only open session if request hasn't been pushed yet
...
closes #1348
2017-06-02 11:12:18 -07:00
David Lord
b9c8c9bad1
deprecate app session methods in favor of session_interface
...
ref #1182
2017-05-29 13:35:02 -07:00
Armin Ronacher
8482ce6b8c
Improve application context popping
...
Exceptions during teardown handling will no longer leave application
contexts lingering around. This fixes #1767
2016-05-26 21:46:56 +02:00
Adrian
a4df0fbb39
Add missing return to g.setdefault
2016-02-02 16:16:01 +01:00
lord63
b55bc0baa2
Remove with_statement in flask/ctx.py
2015-12-13 22:08:31 +08:00
ThiefMaster
bbaf20de7c
Add pop and setdefault to AppCtxGlobals
2015-06-20 18:04:58 +02:00
Martijn Pieters
ec0d208bc1
Switch away from using None as default value for the exception when tearing down a context.
...
When an exception has been handled when using the request / app context in a with statement, `sys.exc_info()` will still contain the exception information even though it has been handled already. The `__exit__` methods pass in `None` for the exception value in that case, which needs to be distinguisable from the default value for the `exc` parameter. Use a dedicated singleton sentinel value instead.
2015-03-23 15:17:19 +00:00
Parkayun
33534bb4a9
Happy New Year 2015
2015-01-02 11:35:00 +09:00
defuz
ad011bc32d
docs: `DEBUG, SERVER_NAME, PATH_INFO`
2014-11-05 07:10:49 +03:00
defuz
8284217593
docs: `True, False and None`
2014-11-05 06:04:58 +03:00
Petr Zemek
ebab6718f7
Unify the uses of "testsuite" vs "test suite".
...
Use "test suite", which is more prevailing in the source code.
2014-10-27 11:31:01 +01:00
Armin Ronacher
817b72d484
Removed deprecated module functionality
2014-08-27 01:12:33 +02:00
Armin Ronacher
e78961c812
Fixed a missing import
2014-01-26 18:08:02 +00:00
Armin Ronacher
52e1c383fa
Make Python 3 happy
2014-01-26 17:47:16 +00:00
Armin Ronacher
6ec83e18dc
Added a workaround for a pypy bug in context managers
2014-01-26 17:34:37 +00:00
Daniel Neuhäuser
52098e1e4f
Happy New Year 2014
2014-01-02 19:21:07 +01:00
Daniel Neuhäuser
a3a2f521f1
Clear exceptions when pushing a context
...
Fixes #882
2013-10-16 20:12:20 +02:00
Armin Ronacher
c889fbc231
Changed interface for flask.g
...
This now makes it behave like it did before, it's just an object.
It did however gain ``__contains__`` and ``__iter__`` and I added
a ``get()`` method to fetch an attribute without raising an
error. This fixes #759 .
2013-06-09 12:06:33 +01:00
Armin Ronacher
0676bb8ab5
Added appcontext_pushed and appcontext_popped signals
2013-06-05 09:53:26 +01:00
Armin Ronacher
1b40b3b573
Fixed request context preservation and teardown handler interaction.
2013-06-02 21:47:32 +01:00
Armin Ronacher
f1918093ac
Changed teardown error handling to be more reliable.
2013-05-30 18:15:17 +01:00
Armin Ronacher
ffd9296507
Close request objects if they support closing.
2013-05-30 12:51:12 +01:00
Thomas Waldmann
13cc69911c
fix typos
2013-05-25 22:01:14 +02:00
Armin Ronacher
16df96c552
Merge branch 'master' into sprint-branch
2013-05-23 14:01:33 +01:00
Armin Ronacher
aecc41deb8
Restore 2.5 support for the time being
2013-05-20 09:47:07 +01:00
Thomas Waldmann
6caaa8a527
automated change using python-modernize: use 'as' in except
2013-05-18 16:24:40 +02:00
Armin Ronacher
097353695e
Added flask.copy_current_request_context which simplies working with greenlets
2013-05-14 11:00:04 +01:00
Armin Ronacher
1949c4a9ab
flask.g is now on the app context and not the request context
2012-12-21 11:45:42 +01:00
Armin Ronacher
3e9f4e254b
Updated a comment that was misleading with recent flask sqlalchemy installations
2012-10-08 07:05:32 +02:00
Armin Ronacher
d5218997d9
Added flask.stream_with_context
2012-06-27 15:06:39 +01:00
Armin Ronacher
2e816f554a
Merge branch 'master' of github.com:mitsuhiko/flask
2012-06-27 12:25:21 +01:00
Armin Ronacher
43c6a1ede8
Fixed a comment
2012-06-27 12:22:39 +01:00
Armin Ronacher
558750494f
Removed unnecessary import
2012-06-27 12:08:01 +01:00
Matt Wright
1f3e667b5d
Fix documention for after_this_request
2012-06-18 18:33:17 -03:00
Armin Ronacher
086348e2f2
Added after_this_request decorator.
2012-05-08 13:14:32 +01:00
Ron DuPlain
33bae1a8dc
Add Flask.request_globals_class to customize g.
...
Requested by toothr on #pocoo.
2012-04-24 02:00:47 -04:00
Armin Ronacher
bcd00e5070
Fixed a typo
2012-04-09 17:56:37 +01:00
Armin Ronacher
cb54c462b8
Pass exc explicitly to the inner context.
2012-04-09 17:32:37 +01:00
Armin Ronacher
9bed20c07c
Added documentation for appcontext and teardown handlers
2012-04-09 17:29:00 +01:00
Armin Ronacher
0207e90155
Updated docs for the app context.
2012-04-09 15:22:36 +01:00
Armin Ronacher
307d1bc4e5
Added support for basic URL generation without request contexts.
2012-04-09 15:04:35 +01:00
Armin Ronacher
47288231fe
Implemented a separate application context.
2012-04-09 14:34:12 +01:00
Armin Ronacher
a1305973bf
Fixed a typo in a comment
2012-04-09 14:19:13 +01:00
Kyle Wild
8532bd51a7
[docstring] Remove an extra if clause to clarify sentence
2012-01-16 13:42:43 -05:00
Kyle Wild
46651659c2
Fix a typo ("is"->"if") in the comments; clarify a bit
2012-01-16 13:42:43 -05:00
Armin Ronacher
7f4c12b335
Break up a circular dependency on shutdown
2011-11-05 17:43:40 +01:00
Armin Ronacher
c6316132b1
Context preserving is now part of Flask and not the test client. This fixes #326
2011-09-24 20:27:38 +02:00
Armin Ronacher
ee8417dac8
Late but 2010 -> 2011 in some files
2011-09-01 16:57:00 +02:00