Martijn Pieters
de1652467b
Remove busy-work. ( #2072 )
...
It is entirely sufficient to walk the MRO of the exception class, no need to check for classes re-appearing later on, no need to add the MRO of any superclass.
* Python refuses point-blank to create a class with a circular MRO.
* All classes in a superclass MRO *already* appear in the MRO of the derived type. Re-adding the contents of a superclass MRO is doing double work.
2016-11-01 07:35:17 -07:00
Clenimar Filemon
cb30a3b562
Update docstring for errorhandler() ( #2070 )
2016-10-31 17:41:38 +01:00
小明
f3d661de66
Fix unbound error ( #2039 )
2016-09-25 18:25:54 +02:00
Pablo Marti
2b47615998
Fix typo in docs
...
Also added one missing comma for readability
2016-09-12 08:41:09 +01:00
Armin Ronacher
9e41eca7f8
Merge pull request #2013 from pallets/bugfix/error-handler-error-handler
...
Corrected after response for error handlers
2016-09-10 03:36:29 +03:00
Akbar Ibrahim
c687ffb192
Fixed error in errorhandler doc string. ( #2014 )
2016-09-08 17:34:51 +02:00
Armin Ronacher
9cd32cac32
Corrected after response for error handlers
...
Before this change after request functions were not correctly
invoked for error handlers.
2016-09-08 11:56:02 +03:00
Markus Unterwaditzer
c4ec6954e5
Don't passthrough_errors unless instructed. ( #2006 )
...
Fix #2005
Revert #1679 and #1996
2016-09-06 22:32:34 +02:00
Afonso Queirós
ccd02bfe8c
Correcting Custom Test Client class docs ( #2004 )
2016-09-05 16:57:00 +02:00
Josh Soref
6e6c3a4636
Spelling ( #1998 )
...
* spelling: cacheability
* spelling: conceptually
* spelling: javascript
* spelling: reset
* spelling: raised
* comma: instead..., they...
2016-08-30 00:26:20 +02:00
Markus Unterwaditzer
098ea0c8ca
Only passthrough_errors if PROPAGATE_EXCEPTIONS
...
See pallets/werkzeug#954
2016-08-27 14:38:13 +02:00
georgschoelly
67e391921c
fix docs: name of url_value_preprocessor method ( #1932 )
...
This typo got introduced in 5da1fc2215 ,
the original commit for the url_value_preprocessor decorator.
2016-06-26 13:32:47 -07:00
Markus Unterwaditzer
5c12721730
Revert "Addressing Issue 1809"
2016-06-14 22:45:24 +02:00
Armin Ronacher
523e271183
Implemented simplified CLI interface
2016-05-26 20:07:52 +02:00
ThiefMaster
c5900a1adf
s/1.0/0.11/ in versionadded/versionchanged markers
...
closes #1817
2016-05-23 14:43:23 +02:00
Thomas Sanjurjo
bdbca923ef
Addressing Issue 1809 ( #1811 )
...
document kwargs for Flask.register_blueprint
2016-05-22 07:09:21 -07:00
Jannis Leidel
88500f5cc7
Forward ported CLI tests from Flask-CLI and fixed a bug with the CLI's name. ( #1806 )
...
* Forward port the CLI tests from Flask-CLI.
* Make sure the parameter passed to the CLI's AppGroup is the app's name, not the app itself.
2016-05-16 19:36:55 +02:00
Steven Loria
2bf477cfea
Add JSONIFY_MIMETYPE configuration variable ( #1728 )
...
Allow jsonify responses' mimetype to be configured
2016-04-08 15:30:47 -07:00
Jeff Widman
6bf42f9a84
Merge pull request #1577 from sprin/1102_warn_on_run
...
docs: run() should not be used in production
2016-04-04 11:22:34 -07:00
Steffen Prince
6e91498e64
docs: run() should not be used in production
...
Refs #1102
2016-04-04 00:03:29 -05:00
lord63
07fdd1930b
Update app.py
2016-02-04 14:35:03 +08:00
lord63
6d0bbd627c
Fix typo
...
* Use the compatible way to handle the exception. You can find the
source code wsgi_app in app.py, and it use the compatible way, so update it
* Fix typo in config.py
* Fix typo in app.py
2016-02-03 21:08:22 +08:00
Miguel Grinberg
952a6c8989
Werkzeug should not block propagated exceptions from Flask
2016-01-02 14:18:36 -08:00
lord63
1d49343bb1
Fix typo in app_ctx_globals_class doc in app.py
2015-11-07 09:04:24 +08:00
Timo Furrer
d526932a09
support timedelta for SEND_FILE_MAX_AGE_DEFAULT config variable
2015-10-24 07:04:23 +02:00
Armin Ronacher
1ac4156016
Fixed some lint warnings
2015-10-02 23:19:54 +02:00
Markus Unterwaditzer
81ae94a5fd
Merge branch '0.10-maintenance'
2015-07-16 12:05:07 +02:00
Christian Becker
5da31f8af3
fix UnboundLocalError in handle_url_build_error
...
- caused by changes in the execution model of python 3 where the alias of an except clause is cleared on exit of the except
2015-07-16 12:00:16 +02:00
Alan Hamlett
99c99c4c16
Enable autoescape for render_template_string
2015-07-04 23:41:43 +02:00
Alan Hamlett
e4f635f8d7
remove whitespace at end of lines
2015-07-04 23:41:31 +02:00
ThiefMaster
6af9690ae9
Remove the deprecated Flask.modules property
2015-06-20 18:09:27 +02:00
Markus Unterwaditzer
d13a1b363e
Rename jinja_env_class
...
Inspired by #1056
2015-06-06 06:29:26 +02:00
Markus Unterwaditzer
d00f5cc9fe
Merge branch 'ThiefMaster-override-jinja-env'
2015-06-06 03:30:49 +02:00
Markus Unterwaditzer
2446ca63a8
0.11 => 1.0
2015-06-06 03:29:44 +02:00
Joshua Carp
348bf52188
Handle empty deque on errorhandler lookup.
...
After registering a custom errorhandler by exception class, raising any
unhandled exception in a view function swallows the error and instead
throws an `IndexError` on trying to look up the appropriate handler.
This patch avoids the uninformative `IndexError` and preserves the
original exception by looping until the deque of classes is empty, not
forever.
2015-06-02 16:13:30 -04:00
Wang Haowei
be45a608e3
fix docstring for _find_errorhandler
2015-05-20 20:31:06 +08:00
Markus Unterwaditzer
7d506f2408
Recursively traverse MRO of exception
2015-04-11 20:52:47 +02:00
Phil Schaf
b31252db55
addressed a few review concerns
2015-04-11 14:24:01 +02:00
Phil Schaf
8c054f04b8
added caching
2015-04-11 14:05:22 +02:00
Phil Schaf
fd8e6b26f9
removed ExceptionHandlerDict
2015-04-11 14:05:22 +02:00
Phil Schaf
0e44cca8e3
Removed 500 not being registerable for blueprints
2015-04-11 14:05:22 +02:00
Phil Schaf
aa4700c276
More verbose message for old broken behavior
2015-04-11 14:05:22 +02:00
Phil Schaf
a6c6cc18f5
Removed unused http code get function
2015-04-11 14:05:22 +02:00
Phil Schaf
7126a22334
Switched to userdict for obsolete Python versions
2015-04-11 14:05:22 +02:00
Phil Schaf
eae48d97b0
Fixed and intuitivized exception handling
2015-04-11 14:05:22 +02:00
ThiefMaster
08ac3aa4e3
Allow custom jinja environments
...
This is useful e.g. when using the new Jinja Environment
attributes added in mitsuhiko/jinja2#404
2015-04-06 15:03:00 +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
Chris Rebert
fe6bcffdad
Document required signature of before_first_request-decorated functions
2015-02-05 12:45:59 -08:00
Chris Rebert
6a2524634d
Document that the return values of teardown functions are ignored
2015-02-05 12:45:11 -08:00
Chris Rebert
eccee36964
Document required signature of before_request functions
...
Unless you happened to also read preprocess_request()'s docstring,
it wasn't not obvious that return values from these functions are treated as
response values.
2015-02-05 12:38:34 -08:00