Josiah Philipsen
611e293555
fixed unmatched elif
...
Also update relevant test
2016-06-03 18:42:07 +02:00
Armin Ronacher
c1496c7719
Merge pull request #1822 from pallets/bugfix/better-pop
...
Improve application context popping
2016-05-26 22:31:15 +02:00
Armin Ronacher
36e6ec9419
Merge pull request #1813 from pallets/bugfix/scheme
...
Resolve state issue for url_for with forced scheme
2016-05-26 21:48:20 +02:00
Armin Ronacher
308af2812e
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
Armin Ronacher
3b98e39768
Implemented simplified CLI interface
2016-05-26 20:07:52 +02:00
dataforger
7108a51bbc
fix docstring ( #1818 )
...
change string to docstring
2016-05-24 21:06:34 +02:00
Armin Ronacher
d8437ce215
Resolve state issue for url_for with forced scheme
...
This fixes #1596
2016-05-22 10:45:29 +02:00
Armin Ronacher
f21bac3d66
Always run gc before leak test
2016-05-22 10:34:48 +02:00
Jannis Leidel
9c4a73013c
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
7d134e9556
Add JSONIFY_MIMETYPE configuration variable ( #1728 )
...
Allow jsonify responses' mimetype to be configured
2016-04-08 15:30:47 -07:00
David Hou
39534d07d1
Raise BadRequest if static file name is invalid
...
* Raise BadRequest if static file name is invalid
* Clean up syntax a bit
* Remove unnecessary close()
2016-04-02 21:07:27 +02:00
Shipeng Feng
5e9842dadb
Fixed stream_with_context if decorated function has parameters
2016-04-01 16:17:45 -07:00
Reuven
98581ec6d6
Use pytest.raises() instead of try/catch with asser 0
...
This is somehow more readable, and enable using the features of pytest's ExeptionInfo (such as errisinstance).
2016-03-04 13:30:40 +02:00
David Lord
679315eace
Merge pull request #1679 from miguelgrinberg/passthrough-errors
...
Werkzeug should not block propagated exceptions from Flask
2016-01-25 22:17:04 -08:00
Jeff Widman
4da4fadfc6
Add support for serializing top-level arrays to JSON
...
Fix #170 , #248 , #510 , #673 , #1177
2016-01-13 13:20:11 -08:00
Miguel Grinberg
2bbddf57f8
Werkzeug should not block propagated exceptions from Flask
2016-01-02 14:18:36 -08:00
Timo Furrer
906e72b219
support timedelta for SEND_FILE_MAX_AGE_DEFAULT config variable
2015-10-24 07:04:23 +02:00
Markus Unterwaditzer
976db05a5b
Merge branch '0.10-maintenance'
2015-07-16 12:05:07 +02:00
Alan Hamlett
a6f9582497
Enable autoescape for render_template_string
2015-07-04 23:41:43 +02:00
ThiefMaster
394acf2112
Add pop and setdefault to AppCtxGlobals
2015-06-20 18:04:58 +02:00
Alexander Pantyukhin
a2c426a6cf
Ignore before_render_template return values
2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
e22a104c56
fix test_signals
2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
cf5e02818e
fix test_signals
2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
d1c1fa9ce3
before_render_template signal can override render template.
2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
61775bf76b
fix endline in the signal.py
2015-06-17 15:42:39 +02:00
Alexander Pantyukhin
cb8edfa806
before_render_template signal
2015-06-17 15:42:39 +02:00
Markus Unterwaditzer
0c442fba62
Rename jinja_env_class
...
Inspired by #1056
2015-06-06 06:29:26 +02:00
Markus Unterwaditzer
1c7135cc9e
Merge branch 'ThiefMaster-override-jinja-env'
2015-06-06 03:30:49 +02:00
Joshua Carp
d32437bf0f
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
Markus Unterwaditzer
f500ba5412
Fix formatting errors
2015-04-11 20:52:47 +02:00
Phil Schaf
0f7727f3de
removed ExceptionHandlerDict
2015-04-11 14:05:22 +02:00
ThiefMaster
2cd1824de5
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
Brandon Sandrowicz
028525d2bf
Fix Possible Typo
...
Looks like that was meant to be `config_key`. It works by accident because the function is defined in the same scope as the look that passes `config_key` to `apprunner`.
2015-04-02 01:48:48 +02:00
Markus Unterwaditzer
89fd83a50c
Revert "Don't use threads in this test"
...
This reverts commit 78cd4161f0 .
2015-03-29 23:03:38 +02:00
Markus Unterwaditzer
42d9cb6363
Don't use threads in this test
...
I think test failures would've been ignored if there were some.
Fixes #1401
2015-03-29 13:40:35 +02:00
Markus Unterwaditzer
6e9b0226c9
Merge branch 'mjpieters-appcontext_ignore_handled_exception'
2015-03-23 16:44:32 +01:00
Martijn Pieters
35a1bc2f4a
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
Markus Unterwaditzer
da89b1e3b8
Always run memory tests
2015-03-22 12:49:47 +01:00
Keyan Pishdadian
b032c2851e
Changed error message to include actual exception contents
2015-03-05 13:04:38 -05:00
Keyan Pishdadian
80f6344770
Change strings to bytes to support Python3, typo in function name
2015-03-04 15:14:43 -05:00
Keyan Pishdadian
f878cddb23
Change tests to support older response format
2015-03-04 14:48:08 -05:00
Keyan Pishdadian
225c59ca8e
Add tests for adding exception to response contents only when DEBUG is True
2015-03-04 14:40:16 -05:00
Chris Rebert
c16e7df2a1
make test_request_preprocessing_early_return more thorough
2015-02-06 13:11:23 -08:00
Markus Unterwaditzer
bf3f336306
Fix test under Python 3
2015-02-06 18:20:17 +01:00
Markus Unterwaditzer
d8642ab085
Add testcase for behavior described in #1338
2015-02-05 22:13:19 +01:00
Ben Jones
db619cc609
Add datetime.date support to JSONEncoder
2015-01-23 07:44:17 -06:00
Parkayun
e05771ff60
Happy New Year 2015
2015-01-02 11:35:00 +09:00
Michael Hall
ca45970012
Fixed #1288 : app.add_url_rule() should look for OPTIONS methods in a case-insensitive manner
2014-12-26 08:58:35 -05:00
Marc Abramowitz
8a022de2ed
Make jsonify terminate responses with a newline
...
This came up in the context of
https://github.com/kennethreitz/httpbin/issues/168
2014-12-07 14:37:26 -08:00
Markus Unterwaditzer
63b06da4dc
Merge pull request #1222 from defuz/templates_auto_reload-eq-none
...
Set TEMPLATE_AUTO_RELOAD default value to None
2014-11-02 20:46:48 +01:00