2018-02-07 22:56:14 +08:00
|
|
|
|
.. currentmodule:: flask
|
|
|
|
|
|
2019-05-18 23:35:47 +08:00
|
|
|
|
Version 1.1.0
|
|
|
|
|
-------------
|
2018-04-27 05:14:11 +08:00
|
|
|
|
|
2018-04-30 10:11:36 +08:00
|
|
|
|
Unreleased
|
|
|
|
|
|
2019-05-07 02:59:43 +08:00
|
|
|
|
- Bump minimum Werkzeug version to >= 0.15.
|
|
|
|
|
- Drop support for Python 3.4.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Error handlers for <20><>InternalServerError<6F><72> or <20><>500<30><30> will always be
|
|
|
|
|
passed an instance of <20><>InternalServerError<6F><72>. If they are invoked
|
2019-06-20 04:58:55 +08:00
|
|
|
|
due to an unhandled exception, that original exception is now
|
2019-06-27 05:46:10 +08:00
|
|
|
|
available as <20><>e.original_exception<6F><6E> rather than being passed
|
2019-06-20 04:58:55 +08:00
|
|
|
|
directly to the handler. The same is true if the handler is for the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
base <20><>HTTPException<6F><6E>. This makes error handler behavior more
|
|
|
|
|
consistent. :pr:<3A>3266<36>
|
2019-06-20 04:58:55 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :meth:<3A>Flask.finalize_request<73> is called for all unhandled
|
|
|
|
|
exceptions even if there is no <20><>500<30><30> error handler.
|
2019-06-20 04:58:55 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :meth:<3A>flask.RequestContext.copy<70> includes the current session
|
|
|
|
|
object in the request context copy. This prevents <20><>session<6F><6E>
|
|
|
|
|
pointing to an out-of-date object. :issue:<3A>2935<33>
|
2019-01-07 22:56:20 +08:00
|
|
|
|
- Using built-in RequestContext, unprintable Unicode characters in
|
|
|
|
|
Host header will result in a HTTP 400 response and not HTTP 500 as
|
2019-06-27 05:46:10 +08:00
|
|
|
|
previously. :pr:<3A>2994<39>
|
|
|
|
|
- :func:<3A>send_file<6C> supports :class:<3A>~os.PathLike<6B> objects as
|
|
|
|
|
described in PEP 0519, to support :mod:<3A>pathlib<69> in Python 3.
|
|
|
|
|
:pr:<3A>3059<35>
|
|
|
|
|
- :func:<3A>send_file<6C> supports :class:<3A>~io.BytesIO<49> partial content.
|
|
|
|
|
:issue:<3A>2957<35>
|
|
|
|
|
- :func:<3A>open_resource<63> accepts the "rt" file mode. This still does
|
|
|
|
|
the same thing as "r". :issue:<3A>3163<36>
|
|
|
|
|
- The :attr:<3A>MethodView.methods<64> attribute set in a base class is used
|
|
|
|
|
by subclasses. :issue:<3A>3138<33>
|
|
|
|
|
- :attr:<3A>Flask.jinja_options<6E> is a <20><>dict<63><74> instead of an
|
|
|
|
|
<20><>ImmutableDict<63><74> to allow easier configuration. Changes must still
|
|
|
|
|
be made before creating the environment. :pr:<3A>3190<39>
|
|
|
|
|
- Flask<73>s <20><>JSONMixin<69><6E> for the request and response wrappers was
|
|
|
|
|
moved into Werkzeug. Use Werkzeug<75>s version with Flask-specific
|
2019-05-07 02:59:43 +08:00
|
|
|
|
support. This bumps the Werkzeug dependency to >= 0.15.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:issue:<3A>3125<32>
|
|
|
|
|
- The <20><>flask<73><6B> command entry point is simplified to take advantage
|
|
|
|
|
of Werkzeug 0.15<EFBFBD>s better reloader support. This bumps the Werkzeug
|
|
|
|
|
dependency to >= 0.15. :issue:<3A>3022<32>
|
|
|
|
|
- Support <20><>static_url_path<74><68> that ends with a forward slash.
|
|
|
|
|
:issue:<3A>3134<33>
|
|
|
|
|
- Support empty <20><>static_folder<65><72> without requiring setting an empty
|
|
|
|
|
<20><>static_url_path<74><68> as well. :pr:<3A>3124<32>
|
|
|
|
|
- :meth:<3A>jsonify<66> supports :class:<3A>dataclasses.dataclass<73> objects.
|
|
|
|
|
:pr:<3A>3195<39>
|
|
|
|
|
- Allow customizing the :attr:<3A>Flask.url_map_class<73> used for routing.
|
|
|
|
|
:pr:<3A>3069<36>
|
2018-09-30 00:38:32 +08:00
|
|
|
|
- The development server port can be set to 0, which tells the OS to
|
2019-06-27 05:46:10 +08:00
|
|
|
|
pick an available port. :issue:<3A>2926<32>
|
|
|
|
|
- The return value from :meth:<3A>cli.load_dotenv<6E> is more consistent
|
|
|
|
|
with the documentation. It will return <20><>False<73><65> if python-dotenv is
|
|
|
|
|
not installed, or if the given path isn<73>t a file. :issue:<3A>2937<33>
|
|
|
|
|
- Signaling support has a stub for the <20><>connect_via<69><61> method when
|
|
|
|
|
the Blinker library is not installed. :pr:<3A>3208<30>
|
|
|
|
|
- Add an <20><>--extra-files<65><73> option to the <20><>flask run<75><6E> CLI command to
|
2019-05-24 22:19:56 +08:00
|
|
|
|
specify extra files that will trigger the reloader on change.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:issue:<3A>2897<39>
|
2019-03-04 01:34:29 +08:00
|
|
|
|
- Allow returning a dictionary from a view function. Similar to how
|
2019-06-27 05:46:10 +08:00
|
|
|
|
returning a string will produce a <20><>text/html<6D><6C> response, returning
|
|
|
|
|
a dict will call <20><>jsonify<66><79> to produce a <20><>application/json<6F><6E>
|
|
|
|
|
response. :pr:<3A>3111<31>
|
|
|
|
|
- Blueprints have a <20><>cli<6C><69> Click group like <20><>app.cli<6C><69>. CLI commands
|
2018-05-15 10:05:54 +08:00
|
|
|
|
registered with a blueprint will be available as a group under the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>flask<73><6B> command. :issue:<3A>1357<35>.
|
|
|
|
|
- When using the test client as a context manager (<28><>with client:<3A><>),
|
2019-04-17 06:29:17 +08:00
|
|
|
|
all preserved request contexts are popped when the block exits,
|
2019-06-27 05:46:10 +08:00
|
|
|
|
ensuring nested contexts are cleaned up correctly. :pr:<3A>3157<35>
|
Better error message when view return type is not supported
Before, returning a `bool` from a route caused the error
```
[2019-05-31 10:08:42,216] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2070, in make_response
rv = self.response_class.force_type(rv, request.environ)
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/wrappers/base_response.py", line 269, in force_type
response = BaseResponse(*_run_wsgi_app(response, environ))
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/wrappers/base_response.py", line 26, in _run_wsgi_app
return _run_wsgi_app(*args)
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/test.py", line 1119, in run_wsgi_app
app_rv = app(environ, start_response)
TypeError: 'bool' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2393, in wsgi_app
response = self.full_dispatch_request()
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 1906, in full_dispatch_request
return self.finalize_request(rv)
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 1921, in finalize_request
response = self.make_response(rv)
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2078, in make_response
reraise(TypeError, new_error, sys.exc_info()[2])
File "/Users/johnzeringue/Documents/ts-open/flask/flask/_compat.py", line 39, in reraise
raise value.with_traceback(tb)
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2070, in make_response
rv = self.response_class.force_type(rv, request.environ)
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/wrappers/base_response.py", line 269, in force_type
response = BaseResponse(*_run_wsgi_app(response, environ))
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/wrappers/base_response.py", line 26, in _run_wsgi_app
return _run_wsgi_app(*args)
File "/Users/johnzeringue/Documents/ts-open/flask/env/lib/python3.7/site-packages/werkzeug/test.py", line 1119, in run_wsgi_app
app_rv = app(environ, start_response)
TypeError: 'bool' object is not callable
The view function did not return a valid response. The return type must be a string, tuple, Response instance, or WSGI callable, but it was a bool.
```
Now, it returns the more readable
```
[2019-05-31 10:36:19,500] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2400, in wsgi_app
response = self.full_dispatch_request()
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 1907, in full_dispatch_request
return self.finalize_request(rv)
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 1922, in finalize_request
response = self.make_response(rv)
File "/Users/johnzeringue/Documents/ts-open/flask/flask/app.py", line 2085, in make_response
" {rv.__class__.__name__}.".format(rv=rv))
TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a bool.
```
Fixes #3214
2019-05-31 22:56:01 +08:00
|
|
|
|
- Show a better error message when the view return type is not
|
2019-06-27 05:46:10 +08:00
|
|
|
|
supported. :issue:<3A>3214<31>
|
|
|
|
|
- <20><>flask.testing.make_test_environ_builder()<29><> has been deprecated in
|
|
|
|
|
favour of a new class <20><>flask.testing.EnvironBuilder<65><72>. :pr:<3A>3232<33>
|
|
|
|
|
- The <20><>flask run<75><6E> command no longer fails if Python is not built
|
|
|
|
|
with SSL support. Using the <20><>--cert<72><74> option will show an
|
|
|
|
|
appropriate error message. :issue:<3A>3211<31>
|
2019-06-14 03:40:01 +08:00
|
|
|
|
- URL matching now occurs after the request context is pushed, rather
|
2019-06-27 05:46:10 +08:00
|
|
|
|
than when it<69>s created. This allows custom URL converters to access
|
2019-06-14 03:40:01 +08:00
|
|
|
|
the app and request contexts, such as to query a database for an id.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:issue:<3A>3088<38>
|
|
|
|
|
|
|
|
|
|
|
2019-06-27 05:32:20 +08:00
|
|
|
|
Version 1.0.4
|
|
|
|
|
-------------
|
|
|
|
|
|
|
|
|
|
Unreleased
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The key information for <20><>BadRequestKeyError<6F><72> is no longer cleared
|
2019-06-27 05:32:20 +08:00
|
|
|
|
outside debug mode, so error handlers can still access it. This
|
2019-06-27 05:46:10 +08:00
|
|
|
|
requires upgrading to Werkzeug 0.15.5. :issue:<3A>3249<34>
|
2018-11-04 11:32:24 +08:00
|
|
|
|
|
2018-04-30 10:11:36 +08:00
|
|
|
|
|
2018-05-02 22:16:58 +08:00
|
|
|
|
Version 1.0.3
|
2018-04-30 10:10:48 +08:00
|
|
|
|
-------------
|
|
|
|
|
|
2019-05-18 01:57:51 +08:00
|
|
|
|
Released 2019-05-17
|
2018-04-27 05:14:11 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :func:<3A>send_file<6C> encodes filenames as ASCII instead of Latin-1
|
2018-05-28 21:26:27 +08:00
|
|
|
|
(ISO-8859-1). This fixes compatibility with Gunicorn, which is
|
2019-06-27 05:46:10 +08:00
|
|
|
|
stricter about header encodings than PEP 3333. :issue:<3A>2766<36>
|
|
|
|
|
- Allow custom CLIs using <20><>FlaskGroup<75><70> to set the debug flag without
|
2018-10-04 20:42:24 +08:00
|
|
|
|
it always being overwritten based on environment variables.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:pr:<3A>2765<36>
|
|
|
|
|
- <20><>flask --version<6F><6E> outputs Werkzeug<75>s version and simplifies the
|
|
|
|
|
Python version. :pr:<3A>2825<32>
|
|
|
|
|
- :func:<3A>send_file<6C> handles an <20><>attachment_filename<6D><65> that is a
|
|
|
|
|
native Python 2 string (bytes) with UTF-8 coded bytes. :issue:<3A>2933<33>
|
|
|
|
|
- A catch-all error handler registered for <20><>HTTPException<6F><6E> will not
|
|
|
|
|
handle <20><>RoutingException<6F><6E>, which is used internally during
|
2019-01-08 01:52:54 +08:00
|
|
|
|
routing. This fixes the unexpected behavior that had been introduced
|
2019-06-27 05:46:10 +08:00
|
|
|
|
in 1.0. :pr:<3A>2986<38>
|
|
|
|
|
- Passing the <20><>json<6F><6E> argument to <20><>app.test_client<6E><74> does not
|
|
|
|
|
push/pop an extra app context. :issue:<3A>2900<30>
|
2018-05-28 21:26:27 +08:00
|
|
|
|
|
|
|
|
|
|
2018-04-30 10:10:48 +08:00
|
|
|
|
Version 1.0.2
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-05-18 01:57:51 +08:00
|
|
|
|
Released 2018-05-02
|
2018-05-02 22:14:08 +08:00
|
|
|
|
|
|
|
|
|
- Fix more backwards compatibility issues with merging slashes between
|
2019-06-27 05:46:10 +08:00
|
|
|
|
a blueprint prefix and route. :pr:<3A>2748<34>
|
|
|
|
|
- Fix error with <20><>flask routes<65><73> command when there are no routes.
|
|
|
|
|
:issue:<3A>2751<35>
|
2018-04-30 10:10:48 +08:00
|
|
|
|
|
|
|
|
|
|
2018-04-27 05:14:44 +08:00
|
|
|
|
Version 1.0.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-05-18 01:57:51 +08:00
|
|
|
|
Released 2018-04-29
|
2018-04-27 05:14:44 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fix registering partials (with no <20><>__name__<5F><5F>) as view functions.
|
|
|
|
|
:pr:<3A>2730<33>
|
|
|
|
|
- Don<6F>t treat lists returned from view functions the same as tuples.
|
|
|
|
|
Only tuples are interpreted as response data. :issue:<3A>2736<33>
|
|
|
|
|
- Extra slashes between a blueprint<6E>s <20><>url_prefix<69><78> and a route URL
|
2018-04-30 09:46:54 +08:00
|
|
|
|
are merged. This fixes some backwards compatibility issues with the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
change in 1.0. :issue:<3A>2731<33>, :issue:<3A>2742<34>
|
|
|
|
|
- Only trap <20><>BadRequestKeyError<6F><72> errors in debug mode, not all
|
|
|
|
|
<20><>BadRequest<73><74> errors. This allows <20><>abort(400)<29><> to continue
|
|
|
|
|
working as expected. :issue:<3A>2735<33>
|
|
|
|
|
- The <20><>FLASK_SKIP_DOTENV<4E><56> environment variable can be set to <20><>1<EFBFBD><31>
|
|
|
|
|
to skip automatically loading dotenv files. :issue:<3A>2722<32>
|
2018-04-27 05:14:44 +08:00
|
|
|
|
|
|
|
|
|
|
2018-01-24 07:34:52 +08:00
|
|
|
|
Version 1.0
|
|
|
|
|
-----------
|
2018-01-05 23:40:51 +08:00
|
|
|
|
|
2019-05-18 01:57:51 +08:00
|
|
|
|
Released 2018-04-26
|
2016-12-31 05:28:43 +08:00
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Python 2.6 and 3.3 are no longer supported.
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Bump minimum dependency versions to the latest stable versions:
|
|
|
|
|
Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:issue:<3A>2586<38>
|
|
|
|
|
- Skip :meth:<3A>app.run <Flask.run><3E> when a Flask application is run
|
2018-04-19 14:03:17 +08:00
|
|
|
|
from the command line. This avoids some behavior that was confusing
|
|
|
|
|
to debug.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Change the default for :data:<3A>JSONIFY_PRETTYPRINT_REGULAR<41> to
|
|
|
|
|
<20><>False<73><65>. :func:<3A>~json.jsonify<66> returns a compact format by
|
|
|
|
|
default, and an indented format in debug mode. :pr:<3A>2193<39>
|
|
|
|
|
- :meth:<3A>Flask.__init__ <Flask><3E> accepts the <20><>host_matching<6E><67>
|
|
|
|
|
argument and sets it on :attr:<3A>~Flask.url_map<61>. :issue:<3A>1559<35>
|
|
|
|
|
- :meth:<3A>Flask.__init__ <Flask><3E> accepts the <20><>static_host<73><74> argument
|
|
|
|
|
and passes it as the <20><>host<73><74> argument when defining the static
|
|
|
|
|
route. :issue:<3A>1559<35>
|
|
|
|
|
- :func:<3A>send_file<6C> supports Unicode in <20><>attachment_filename<6D><65>.
|
|
|
|
|
:pr:<3A>2223<32>
|
|
|
|
|
- Pass <20><>_scheme<6D><65> argument from :func:<3A>url_for<6F> to
|
|
|
|
|
:meth:<3A>~Flask.handle_url_build_error<6F>. :pr:<3A>2017<31>
|
|
|
|
|
- :meth:<3A>~Flask.add_url_rule<6C> accepts the
|
|
|
|
|
<20><>provide_automatic_options<6E><73> argument to disable adding the
|
|
|
|
|
<20><>OPTIONS<4E><53> method. :pr:<3A>1489<38>
|
|
|
|
|
- :class:<3A>~views.MethodView<65> subclasses inherit method handlers from
|
|
|
|
|
base classes. :pr:<3A>1936<33>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Errors caused while opening the session at the beginning of the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
request are handled by the app<70>s error handlers. :pr:<3A>2254<35>
|
|
|
|
|
- Blueprints gained :attr:<3A>~Blueprint.json_encoder<65> and
|
|
|
|
|
:attr:<3A>~Blueprint.json_decoder<65> attributes to override the app<70>s
|
|
|
|
|
encoder and decoder. :pr:<3A>1898<39>
|
|
|
|
|
- :meth:<3A>Flask.make_response<73> raises <20><>TypeError<6F><72> instead of
|
|
|
|
|
<20><>ValueError<6F><72> for bad response types. The error messages have been
|
|
|
|
|
improved to describe why the type is invalid. :pr:<3A>2256<35>
|
|
|
|
|
- Add <20><>routes<65><73> CLI command to output routes registered on the
|
|
|
|
|
application. :pr:<3A>2259<35>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Show warning when session cookie domain is a bare hostname or an IP
|
|
|
|
|
address, as these may not behave properly in some browsers, such as
|
2019-06-27 05:46:10 +08:00
|
|
|
|
Chrome. :pr:<3A>2282<38>
|
|
|
|
|
- Allow IP address as exact session cookie domain. :pr:<3A>2282<38>
|
|
|
|
|
- <20><>SESSION_COOKIE_DOMAIN<49><4E> is set if it is detected through
|
|
|
|
|
<20><>SERVER_NAME<4D><45>. :pr:<3A>2282<38>
|
|
|
|
|
- Auto-detect zero-argument app factory called <20><>create_app<70><70> or
|
|
|
|
|
<20><>make_app<70><70> from <20><>FLASK_APP<50><50>. :pr:<3A>2297<39>
|
|
|
|
|
- Factory functions are not required to take a <20><>script_info<66><6F>
|
|
|
|
|
parameter to work with the <20><>flask<73><6B> command. If they take a single
|
|
|
|
|
parameter or a parameter named <20><>script_info<66><6F>, the
|
|
|
|
|
:class:<3A>~cli.ScriptInfo<66> object will be passed. :pr:<3A>2319<31>
|
|
|
|
|
- <20><>FLASK_APP<50><50> can be set to an app factory, with arguments if
|
|
|
|
|
needed, for example <20><>FLASK_APP=myproject.app:create_app(<28>dev<65>)<29><>.
|
|
|
|
|
:pr:<3A>2326<32>
|
|
|
|
|
- <20><>FLASK_APP<50><50> can point to local packages that are not installed in
|
|
|
|
|
editable mode, although <20><>pip install -e<><65> is still preferred.
|
|
|
|
|
:pr:<3A>2414<31>
|
|
|
|
|
- The :class:<3A>~views.View<65> class attribute
|
|
|
|
|
:attr:<3A>~views.View.provide_automatic_options<6E> is set in
|
|
|
|
|
:meth:<3A>~views.View.as_view<65>, to be detected by
|
|
|
|
|
:meth:<3A>~Flask.add_url_rule<6C>. :pr:<3A>2316<31>
|
|
|
|
|
- Error handling will try handlers registered for <20><>blueprint, code<64><65>,
|
|
|
|
|
<20><>app, code<64><65>, <20><>blueprint, exception<6F><6E>, <20><>app, exception<6F><6E>.
|
|
|
|
|
:pr:<3A>2314<31>
|
|
|
|
|
- <20><>Cookie<69><65> is added to the response<73>s <20><>Vary<72><79> header if the session
|
|
|
|
|
is accessed at all during the request (and not deleted). :pr:<3A>2288<38>
|
|
|
|
|
- :meth:<3A>~Flask.test_request_context<78> accepts <20><>subdomain<69><6E> and
|
|
|
|
|
<20><>url_scheme<6D><65> arguments for use when building the base URL.
|
|
|
|
|
:pr:<3A>1621<32>
|
|
|
|
|
- Set :data:<3A>APPLICATION_ROOT<4F> to <20><><EFBFBD>/<2F><><EFBFBD> by default. This was already
|
|
|
|
|
the implicit default when it was set to <20><>None<6E><65>.
|
|
|
|
|
- :data:<3A>TRAP_BAD_REQUEST_ERRORS<52> is enabled by default in debug mode.
|
|
|
|
|
<20><>BadRequestKeyError<6F><72> has a message with the bad key in debug mode
|
|
|
|
|
instead of the generic bad request message. :pr:<3A>2348<34>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Allow registering new tags with
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:class:<3A>~json.tag.TaggedJSONSerializer<65> to support storing other
|
|
|
|
|
types in the session cookie. :pr:<3A>2352<35>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Only open the session if the request has not been pushed onto the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
context stack yet. This allows :func:<3A>~stream_with_context<78>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
generators to access the same session that the containing view uses.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:pr:<3A>2354<35>
|
|
|
|
|
- Add <20><>json<6F><6E> keyword argument for the test client request methods.
|
2018-04-19 14:03:17 +08:00
|
|
|
|
This will dump the given object as JSON and set the appropriate
|
2019-06-27 05:46:10 +08:00
|
|
|
|
content type. :pr:<3A>2358<35>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Extract JSON handling to a mixin applied to both the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:class:<3A>Request<73> and :class:<3A>Response<73> classes. This adds the
|
|
|
|
|
:meth:<3A>~Response.is_json<6F> and :meth:<3A>~Response.get_json<6F> methods to
|
|
|
|
|
the response to make testing JSON response much easier. :pr:<3A>2358<35>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Removed error handler caching because it caused unexpected results
|
|
|
|
|
for some exception inheritance hierarchies. Register handlers
|
|
|
|
|
explicitly for each exception if you want to avoid traversing the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
MRO. :pr:<3A>2362<36>
|
|
|
|
|
- Fix incorrect JSON encoding of aware, non-UTC datetimes. :pr:<3A>2374<37>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Template auto reloading will honor debug mode even even if
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:attr:<3A>~Flask.jinja_env<6E> was already accessed. :pr:<3A>2373<37>
|
|
|
|
|
- The following old deprecated code was removed. :issue:<3A>2385<38>
|
|
|
|
|
|
|
|
|
|
- <20><>flask.ext<78><74> - import extensions directly by their name instead
|
|
|
|
|
of through the <20><>flask.ext<78><74> namespace. For example,
|
|
|
|
|
<20><>import flask.ext.sqlalchemy<6D><79> becomes
|
|
|
|
|
<20><>import flask_sqlalchemy<6D><79>.
|
|
|
|
|
- <20><>Flask.init_jinja_globals<6C><73> - extend
|
|
|
|
|
:meth:<3A>Flask.create_jinja_environment<6E> instead.
|
|
|
|
|
- <20><>Flask.error_handlers<72><73> - tracked by
|
|
|
|
|
:attr:<3A>Flask.error_handler_spec<65>, use :meth:<3A>Flask.errorhandler<65>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
to register handlers.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>Flask.request_globals_class<73><73> - use
|
|
|
|
|
:attr:<3A>Flask.app_ctx_globals_class<73> instead.
|
|
|
|
|
- <20><>Flask.static_path<74><68> - use :attr:<3A>Flask.static_url_path<74>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
instead.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>Request.module<6C><65> - use :attr:<3A>Request.blueprint<6E> instead.
|
|
|
|
|
|
|
|
|
|
- The :attr:<3A>Request.json<6F> property is no longer deprecated.
|
|
|
|
|
:issue:<3A>1421<32>
|
|
|
|
|
- Support passing a :class:<3A>~werkzeug.test.EnvironBuilder<65> or <20><>dict<63><74>
|
|
|
|
|
to :meth:<3A>test_client.open <werkzeug.test.Client.open><3E>. :pr:<3A>2412<31>
|
|
|
|
|
- The <20><>flask<73><6B> command and :meth:<3A>Flask.run<75> will load environment
|
|
|
|
|
variables from <20><>.env<6E><76> and <20><>.flaskenv<6E><76> files if python-dotenv is
|
|
|
|
|
installed. :pr:<3A>2416<31>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- When passing a full URL to the test client, the scheme in the URL is
|
2019-06-27 05:46:10 +08:00
|
|
|
|
used instead of :data:<3A>PREFERRED_URL_SCHEME<4D>. :pr:<3A>2430<33>
|
|
|
|
|
- :attr:<3A>Flask.logger<65> has been simplified. <20><>LOGGER_NAME<4D><45> and
|
|
|
|
|
<20><>LOGGER_HANDLER_POLICY<43><59> config was removed. The logger is always
|
|
|
|
|
named <20><>flask.app<70><70>. The level is only set on first access, it
|
|
|
|
|
doesn<73>t check :attr:<3A>Flask.debug<75> each time. Only one format is
|
|
|
|
|
used, not different ones depending on :attr:<3A>Flask.debug<75>. No
|
2018-04-19 14:03:17 +08:00
|
|
|
|
handlers are removed, and a handler is only added if no handlers are
|
2019-06-27 05:46:10 +08:00
|
|
|
|
already configured. :pr:<3A>2436<33>
|
|
|
|
|
- Blueprint view function names may not contain dots. :pr:<3A>2450<35>
|
|
|
|
|
- Fix a <20><>ValueError<6F><72> caused by invalid <20><>Range<67><65> requests in some
|
|
|
|
|
cases. :issue:<3A>2526<32>
|
|
|
|
|
- The development server uses threads by default. :pr:<3A>2529<32>
|
|
|
|
|
- Loading config files with <20><>silent=True<75><65> will ignore
|
|
|
|
|
:data:<3A>~errno.ENOTDIR<49> errors. :pr:<3A>2581<38>
|
|
|
|
|
- Pass <20><>--cert<72><74> and <20><>--key<65><79> options to <20><>flask run<75><6E> to run the
|
|
|
|
|
development server over HTTPS. :pr:<3A>2606<30>
|
|
|
|
|
- Added :data:<3A>SESSION_COOKIE_SAMESITE<54> to control the <20><>SameSite<74><65>
|
|
|
|
|
attribute on the session cookie. :pr:<3A>2607<30>
|
|
|
|
|
- Added :meth:<3A>~flask.Flask.test_cli_runner<65> to create a Click runner
|
|
|
|
|
that can invoke Flask CLI commands for testing. :pr:<3A>2636<33>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Subdomain matching is disabled by default and setting
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:data:<3A>SERVER_NAME<4D> does not implicitly enable it. It can be enabled
|
|
|
|
|
by passing <20><>subdomain_matching=True<75><65> to the <20><>Flask<73><6B> constructor.
|
|
|
|
|
:pr:<3A>2635<33>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- A single trailing slash is stripped from the blueprint
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>url_prefix<69><78> when it is registered with the app. :pr:<3A>2629<32>
|
|
|
|
|
- :meth:<3A>Request.get_json<6F> doesn<73>t cache the result if parsing fails
|
|
|
|
|
when <20><>silent<6E><74> is true. :issue:<3A>2651<35>
|
|
|
|
|
- :func:<3A>Request.get_json<6F> no longer accepts arbitrary encodings.
|
|
|
|
|
Incoming JSON should be encoded using UTF-8 per :rfc:<3A>8259<35>, but
|
|
|
|
|
Flask will autodetect UTF-8, -16, or -32. :pr:<3A>2691<39>
|
|
|
|
|
- Added :data:<3A>MAX_COOKIE_SIZE<5A> and :attr:<3A>Response.max_cookie_size<7A>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
to control when Werkzeug warns about large cookies that browsers may
|
2019-06-27 05:46:10 +08:00
|
|
|
|
ignore. :pr:<3A>2693<39>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Updated documentation theme to make docs look better in small
|
2019-06-27 05:46:10 +08:00
|
|
|
|
windows. :pr:<3A>2709<30>
|
2018-04-19 14:03:17 +08:00
|
|
|
|
- Rewrote the tutorial docs and example project to take a more
|
|
|
|
|
structured approach to help new users avoid common pitfalls.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:pr:<3A>2676<37>
|
2018-04-27 03:22:45 +08:00
|
|
|
|
|
|
|
|
|
|
2018-04-30 09:22:05 +08:00
|
|
|
|
Version 0.12.4
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2018-04-29
|
2018-04-27 03:22:45 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Repackage 0.12.3 to fix package layout issue. :issue:<3A>2728<32>
|
2018-04-30 10:36:07 +08:00
|
|
|
|
|
2018-04-27 03:22:45 +08:00
|
|
|
|
|
2017-11-23 17:32:13 +08:00
|
|
|
|
Version 0.12.3
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2018-04-26
|
2017-11-23 17:32:13 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :func:<3A>Request.get_json<6F> no longer accepts arbitrary encodings.
|
|
|
|
|
Incoming JSON should be encoded using UTF-8 per :rfc:<3A>8259<35>, but
|
|
|
|
|
Flask will autodetect UTF-8, -16, or -32. :issue:<3A>2692<39>
|
|
|
|
|
- Fix a Python warning about imports when using <20><>python -m flask<73><6B>.
|
|
|
|
|
:issue:<3A>2666<36>
|
|
|
|
|
- Fix a <20><>ValueError<6F><72> caused by invalid <20><>Range<67><65> requests in some
|
2018-04-11 04:10:53 +08:00
|
|
|
|
cases.
|
|
|
|
|
|
2017-11-23 17:32:13 +08:00
|
|
|
|
|
2017-05-16 07:58:01 +08:00
|
|
|
|
Version 0.12.2
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2017-05-16
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fix a bug in <20><>safe_join<69><6E> on Windows.
|
2017-05-16 07:58:01 +08:00
|
|
|
|
|
|
|
|
|
|
2016-12-25 23:33:55 +08:00
|
|
|
|
Version 0.12.1
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2017-03-31
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Prevent <20><>flask run<75><6E> from showing a <20><>NoAppException<6F><6E> when an
|
|
|
|
|
<20><>ImportError<6F><72> occurs within the imported application module.
|
|
|
|
|
- Fix encoding behavior of <20><>app.config.from_pyfile<6C><65> for Python 3.
|
|
|
|
|
:issue:<3A>2118<31>
|
|
|
|
|
- Use the <20><>SERVER_NAME<4D><45> config if it is present as default values
|
|
|
|
|
for <20><>app.run<75><6E>. :issue:<3A>2109<30>, :pr:<3A>2152<35>
|
|
|
|
|
- Call <20><>ctx.auto_pop<6F><70> with the exception object instead of <20><>None<6E><65>,
|
|
|
|
|
in the event that a <20><>BaseException<6F><6E> such as <20><>KeyboardInterrupt<70><74>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
is raised in a request handler.
|
2016-12-25 23:33:55 +08:00
|
|
|
|
|
2016-12-26 10:50:47 +08:00
|
|
|
|
|
2016-06-02 19:53:35 +08:00
|
|
|
|
Version 0.12
|
|
|
|
|
------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2016-12-21, codename Punsch
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The cli command now responds to <20><>--version<6F><6E>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Mimetype guessing and ETag generation for file-like objects in
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>send_file<6C><65> has been removed. :issue:<3A>104<30>, :pr<70>1849<34>
|
|
|
|
|
- Mimetype guessing in <20><>send_file<6C><65> now fails loudly and doesn<73>t fall
|
|
|
|
|
back to <20><>application/octet-stream<61><6D>. :pr:<3A>1988<38>
|
|
|
|
|
- Make <20><>flask.safe_join<69><6E> able to join multiple paths like
|
|
|
|
|
<20><>os.path.join<69><6E> :pr:<3A>1730<33>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Revert a behavior change that made the dev server crash instead of
|
2019-06-27 05:46:10 +08:00
|
|
|
|
returning an Internal Server Error. :pr:<3A>2006<30>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Correctly invoke response handlers for both regular request
|
|
|
|
|
dispatching as well as error handlers.
|
|
|
|
|
- Disable logger propagation by default for the app logger.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Add support for range requests in <20><>send_file<6C><65>.
|
|
|
|
|
- <20><>app.test_client<6E><74> includes preset default environment, which can
|
|
|
|
|
now be directly set, instead of per <20><>client.get<65><74>.
|
|
|
|
|
- Fix crash when running under PyPy3. :pr:<3A>1814<31>
|
2018-05-22 18:39:35 +08:00
|
|
|
|
|
2016-06-14 02:29:21 +08:00
|
|
|
|
|
2016-06-04 00:43:32 +08:00
|
|
|
|
Version 0.11.1
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2016-06-07
|
2016-06-04 00:43:32 +08:00
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed a bug that prevented <20><>FLASK_APP=foobar/__init__.py<70><79> from
|
|
|
|
|
working. :pr:<3A>1872<37>
|
2019-01-04 09:17:45 +08:00
|
|
|
|
|
2016-06-04 00:43:32 +08:00
|
|
|
|
|
2016-05-27 03:05:39 +08:00
|
|
|
|
Version 0.11
|
|
|
|
|
------------
|
2013-07-30 22:43:41 +08:00
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2016-05-29, codename Absinthe
|
|
|
|
|
|
|
|
|
|
- Added support to serializing top-level arrays to
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:func:<3A>flask.jsonify<66>. This introduces a security risk in ancient
|
|
|
|
|
browsers. See :ref:<3A>json-security<74> for details.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Added before_render_template signal.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>**kwargs<67><73> to :meth:<3A>flask.Test.test_client<6E> to support
|
2019-06-24 03:21:31 +08:00
|
|
|
|
passing additional keyword arguments to the constructor of
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:attr:<3A>flask.Flask.test_client_class<73>.
|
|
|
|
|
- Added <20><>SESSION_REFRESH_EACH_REQUEST<53><54> config key that controls the
|
|
|
|
|
set-cookie behavior. If set to <20><>True<75><65> a permanent session will be
|
2019-06-24 03:21:31 +08:00
|
|
|
|
refreshed each request and get their lifetime extended, if set to
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>False<73><65> it will only be modified if the session actually modifies.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Non permanent sessions are not affected by this and will always
|
|
|
|
|
expire if the browser window closes.
|
|
|
|
|
- Made Flask support custom JSON mimetypes for incoming data.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added support for returning tuples in the form <20><>(response,
|
|
|
|
|
headers)<29><> from a view function.
|
|
|
|
|
- Added :meth:<3A>flask.Config.from_json<6F>.
|
|
|
|
|
- Added :attr:<3A>flask.Flask.config_class<73>.
|
|
|
|
|
- Added :meth:<3A>flask.Config.get_namespace<63>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Templates are no longer automatically reloaded outside of debug
|
2019-06-27 05:46:10 +08:00
|
|
|
|
mode. This can be configured with the new <20><>TEMPLATES_AUTO_RELOAD<41><44>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
config key.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added a workaround for a limitation in Python 3.3<EFBFBD>s namespace
|
2019-06-24 03:21:31 +08:00
|
|
|
|
loader.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added support for explicit root paths when using Python 3.3<EFBFBD>s
|
2019-06-24 03:21:31 +08:00
|
|
|
|
namespace packages.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :command:<3A>flask<73> and the <20><>flask.cli<6C><69> module to start the
|
2019-06-24 03:21:31 +08:00
|
|
|
|
local debug server through the click CLI system. This is recommended
|
2019-06-27 05:46:10 +08:00
|
|
|
|
over the old <20><>flask.run()<29><> method as it works faster and more
|
2019-06-24 03:21:31 +08:00
|
|
|
|
reliable due to a different design and also replaces
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>Flask-Script<70><74>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Error handlers that match specific classes are now checked first,
|
|
|
|
|
thereby allowing catching exceptions that are subclasses of HTTP
|
2019-06-27 05:46:10 +08:00
|
|
|
|
exceptions (in <20><>werkzeug.exceptions<6E><73>). This makes it possible for
|
2019-06-24 03:21:31 +08:00
|
|
|
|
an extension author to create exceptions that will by default result
|
|
|
|
|
in the HTTP error of their choosing, but may be caught with a custom
|
|
|
|
|
error handler if desired.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :meth:<3A>flask.Config.from_mapping<6E>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Flask will now log by default even if debug is disabled. The log
|
|
|
|
|
format is now hardcoded but the default log handling can be disabled
|
2019-06-27 05:46:10 +08:00
|
|
|
|
through the <20><>LOGGER_HANDLER_POLICY<43><59> configuration key.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Removed deprecated module functionality.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added the <20><>EXPLAIN_TEMPLATE_LOADING<4E><47> config flag which when
|
2019-06-24 03:21:31 +08:00
|
|
|
|
enabled will instruct Flask to explain how it locates templates.
|
|
|
|
|
This should help users debug when the wrong templates are loaded.
|
|
|
|
|
- Enforce blueprint handling in the order they were registered for
|
|
|
|
|
template loading.
|
|
|
|
|
- Ported test suite to py.test.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Deprecated <20><>request.json<6F><6E> in favour of <20><>request.get_json()<29><>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Add "pretty" and "compressed" separators definitions in jsonify()
|
|
|
|
|
method. Reduces JSON response size when
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>JSONIFY_PRETTYPRINT_REGULAR=False<73><65> by removing unnecessary white
|
2019-06-24 03:21:31 +08:00
|
|
|
|
space included by default after separators.
|
|
|
|
|
- JSON responses are now terminated with a newline character, because
|
|
|
|
|
it is a convention that UNIX text files end with a newline and some
|
2019-06-27 05:46:10 +08:00
|
|
|
|
clients don<6F>t deal well when this newline is missing. This came up
|
2019-06-24 03:21:31 +08:00
|
|
|
|
originally as a part of
|
2019-06-27 05:46:10 +08:00
|
|
|
|
https://github.com/postmanlabs/httpbin/issues/168. :pr:<3A>1262<36>
|
|
|
|
|
- The automatically provided <20><>OPTIONS<4E><53> method is now correctly
|
2019-06-24 03:21:31 +08:00
|
|
|
|
disabled if the user registered an overriding rule with the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
lowercase-version <20><>options<6E><73>. :issue:<3A>1288<38>
|
|
|
|
|
- <20><>flask.json.jsonify<66><79> now supports the <20><>datetime.date<74><65> type.
|
|
|
|
|
:pr:<3A>1326<32>
|
|
|
|
|
- Don<6F>t leak exception info of already caught exceptions to context
|
|
|
|
|
teardown handlers. :pr:<3A>1393<39>
|
|
|
|
|
- Allow custom Jinja environment subclasses. :pr:<3A>1422<32>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Updated extension dev guidelines.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>flask.g<><67> now has <20><>pop()<29><> and <20><>setdefault<6C><74> methods.
|
|
|
|
|
- Turn on autoescape for <20><>flask.templating.render_template_string<6E><67>
|
|
|
|
|
by default. :pr:<3A>1515<31>
|
|
|
|
|
- <20><>flask.ext<78><74> is now deprecated. :pr:<3A>1484<38>
|
|
|
|
|
- <20><>send_from_directory<72><79> now raises BadRequest if the filename is
|
|
|
|
|
invalid on the server OS. :pr:<3A>1763<36>
|
|
|
|
|
- Added the <20><>JSONIFY_MIMETYPE<50><45> configuration variable. :pr:<3A>1728<32>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Exceptions during teardown handling will no longer leave bad
|
|
|
|
|
application contexts lingering around.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed broken <20><>test_appcontext_signals()<29><> test case.
|
|
|
|
|
- Raise an :exc:<3A>AttributeError<6F> in :func:<3A>flask.helpers.find_package<67>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
with a useful message explaining why it is raised when a PEP 302
|
2019-06-27 05:46:10 +08:00
|
|
|
|
import hook is used without an <20><>is_package()<29><> method.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Fixed an issue causing exceptions raised before entering a request
|
|
|
|
|
or app context to be passed to teardown handlers.
|
|
|
|
|
- Fixed an issue with query parameters getting removed from requests
|
|
|
|
|
in the test client when absolute URLs were requested.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Made <20><>@before_first_request<73><74> into a decorator as intended.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Fixed an etags bug when sending a file streams with a name.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed <20><>send_from_directory<72><79> not expanding to the application root
|
2019-06-24 03:21:31 +08:00
|
|
|
|
path correctly.
|
|
|
|
|
- Changed logic of before first request handlers to flip the flag
|
|
|
|
|
after invoking. This will allow some uses that are potentially
|
|
|
|
|
dangerous but should probably be permitted.
|
|
|
|
|
- Fixed Python 3 bug when a handler from
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>app.url_build_error_handlers<72><73> reraises the <20><>BuildError<6F><72>.
|
2013-06-27 22:49:27 +08:00
|
|
|
|
|
|
|
|
|
|
2013-06-14 06:36:50 +08:00
|
|
|
|
Version 0.10.1
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2013-06-14
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed an issue where <20><>|tojson<6F><6E> was not quoting single quotes which
|
|
|
|
|
made the filter not work properly in HTML attributes. Now it<69>s
|
2019-06-24 03:21:31 +08:00
|
|
|
|
possible to use that filter in single quoted attributes. This should
|
|
|
|
|
make using that filter with angular.js easier.
|
|
|
|
|
- Added support for byte strings back to the session system. This
|
|
|
|
|
broke compatibility with the common case of people putting binary
|
|
|
|
|
data for token verification into the session.
|
|
|
|
|
- Fixed an issue where registering the same method twice for the same
|
|
|
|
|
endpoint would trigger an exception incorrectly.
|
2013-06-14 06:36:50 +08:00
|
|
|
|
|
2013-06-14 07:05:09 +08:00
|
|
|
|
|
2012-08-11 09:36:14 +08:00
|
|
|
|
Version 0.10
|
|
|
|
|
------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2013-06-13, codename Limoncello
|
|
|
|
|
|
|
|
|
|
- Changed default cookie serialization format from pickle to JSON to
|
|
|
|
|
limit the impact an attacker can do if the secret key leaks. See
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:ref:<3A>upgrading-to-010<31> for more information.
|
|
|
|
|
- Added <20><>template_test<73><74> methods in addition to the already existing
|
|
|
|
|
<20><>template_filter<65><72> method family.
|
|
|
|
|
- Added <20><>template_global<61><6C> methods in addition to the already
|
|
|
|
|
existing <20><>template_filter<65><72> method family.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Set the content-length header for x-sendfile.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>tojson<6F><6E> filter now does not escape script blocks in HTML5
|
2019-06-24 03:21:31 +08:00
|
|
|
|
parsers.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>tojson<6F><6E> used in templates is now safe by default due. This was
|
2019-06-24 03:21:31 +08:00
|
|
|
|
allowed due to the different escaping behavior.
|
|
|
|
|
- Flask will now raise an error if you attempt to register a new
|
|
|
|
|
function on an already used endpoint.
|
|
|
|
|
- Added wrapper module around simplejson and added default
|
|
|
|
|
serialization of datetime objects. This allows much easier
|
|
|
|
|
customization of how JSON is handled by Flask or any Flask
|
|
|
|
|
extension.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Removed deprecated internal <20><>flask.session<6F><6E> module alias. Use
|
|
|
|
|
<20><>flask.sessions<6E><73> instead to get the session module. This is not to
|
|
|
|
|
be confused with <20><>flask.session<6F><6E> the session proxy.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Templates can now be rendered without request context. The behavior
|
2019-06-27 05:46:10 +08:00
|
|
|
|
is slightly different as the <20><>request<73><74>, <20><>session<6F><6E> and <20><>g<EFBFBD><67>
|
|
|
|
|
objects will not be available and blueprint<6E>s context processors are
|
2019-06-24 03:21:31 +08:00
|
|
|
|
not called.
|
|
|
|
|
- The config object is now available to the template as a real global
|
|
|
|
|
and not through a context processor which makes it available even in
|
|
|
|
|
imported templates by default.
|
|
|
|
|
- Added an option to generate non-ascii encoded JSON which should
|
2019-06-27 05:46:10 +08:00
|
|
|
|
result in less bytes being transmitted over the network. It<49>s
|
2019-06-24 03:21:31 +08:00
|
|
|
|
disabled by default to not cause confusion with existing libraries
|
2019-06-27 05:46:10 +08:00
|
|
|
|
that might expect <20><>flask.json.dumps<70><73> to return bytestrings by
|
2019-06-24 03:21:31 +08:00
|
|
|
|
default.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>flask.g<><67> is now stored on the app context instead of the request
|
2019-06-24 03:21:31 +08:00
|
|
|
|
context.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>flask.g<><67> now gained a <20><>get()<29><> method for not erroring out on
|
2019-06-24 03:21:31 +08:00
|
|
|
|
non existing items.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>flask.g<><67> now can be used with the <20><>in<69><6E> operator to see what<61>s
|
2019-06-24 03:21:31 +08:00
|
|
|
|
defined and it now is iterable and will yield all attributes stored.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>flask.Flask.request_globals_class<73><73> got renamed to
|
|
|
|
|
<20><>flask.Flask.app_ctx_globals_class<73><73> which is a better name to what
|
2019-06-24 03:21:31 +08:00
|
|
|
|
it does since 0.10.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>request<73><74>, <20><>session<6F><6E> and <20><>g<EFBFBD><67> are now also added as proxies to
|
2019-06-24 03:21:31 +08:00
|
|
|
|
the template context which makes them available in imported
|
|
|
|
|
templates. One has to be very careful with those though because
|
|
|
|
|
usage outside of macros might cause caching.
|
|
|
|
|
- Flask will no longer invoke the wrong error handlers if a proxy
|
|
|
|
|
exception is passed through.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added a workaround for chrome<6D>s cookies in localhost not working as
|
2019-06-24 03:21:31 +08:00
|
|
|
|
intended with domain names.
|
|
|
|
|
- Changed logic for picking defaults for cookie values from sessions
|
|
|
|
|
to work better with Google Chrome.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>message_flashed<65><64> signal that simplifies flashing testing.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Added support for copying of request contexts for better working
|
|
|
|
|
with greenlets.
|
|
|
|
|
- Removed custom JSON HTTP exception subclasses. If you were relying
|
|
|
|
|
on them you can reintroduce them again yourself trivially. Using
|
|
|
|
|
them however is strongly discouraged as the interface was flawed.
|
|
|
|
|
- Python requirements changed: requiring Python 2.6 or 2.7 now to
|
|
|
|
|
prepare for Python 3.3 port.
|
|
|
|
|
- Changed how the teardown system is informed about exceptions. This
|
|
|
|
|
is now more reliable in case something handles an exception halfway
|
|
|
|
|
through the error handling process.
|
|
|
|
|
- Request context preservation in debug mode now keeps the exception
|
|
|
|
|
information around which means that teardown handlers are able to
|
|
|
|
|
distinguish error from success cases.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added the <20><>JSONIFY_PRETTYPRINT_REGULAR<41><52> configuration variable.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Flask now orders JSON keys by default to not trash HTTP caches due
|
|
|
|
|
to different hash seeds between different workers.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>appcontext_pushed<65><64> and <20><>appcontext_popped<65><64> signals.
|
|
|
|
|
- The builtin run method now takes the <20><>SERVER_NAME<4D><45> into account
|
2019-06-24 03:21:31 +08:00
|
|
|
|
when picking the default port to run on.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>flask.request.get_json()<29><> as a replacement for the old
|
|
|
|
|
<20><>flask.request.json<6F><6E> property.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
|
2012-08-11 09:36:14 +08:00
|
|
|
|
|
2011-09-30 05:36:57 +08:00
|
|
|
|
Version 0.9
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2012-07-01, codename Campari
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The :func:<3A>flask.Request.on_json_loading_failed<65> now returns a JSON
|
2019-06-24 03:21:31 +08:00
|
|
|
|
formatted response by default.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The :func:<3A>flask.url_for<6F> function now can generate anchors to the
|
2019-06-24 03:21:31 +08:00
|
|
|
|
generated links.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The :func:<3A>flask.url_for<6F> function now can also explicitly generate
|
2019-06-24 03:21:31 +08:00
|
|
|
|
URL rules specific to a given HTTP method.
|
|
|
|
|
- Logger now only returns the debug log setting if it was not set
|
|
|
|
|
explicitly.
|
|
|
|
|
- Unregister a circular dependency between the WSGI environment and
|
|
|
|
|
the request object when shutting down the request. This means that
|
2019-06-27 05:46:10 +08:00
|
|
|
|
environ <20><>werkzeug.request<73><74> will be <20><>None<6E><65> after the response was
|
2019-06-24 03:21:31 +08:00
|
|
|
|
returned to the WSGI server but has the advantage that the garbage
|
|
|
|
|
collector is not needed on CPython to tear down the request unless
|
|
|
|
|
the user created circular dependencies themselves.
|
|
|
|
|
- Session is now stored after callbacks so that if the session payload
|
|
|
|
|
is stored in the session you can still modify it in an after request
|
|
|
|
|
callback.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The :class:<3A>flask.Flask<73> class will avoid importing the provided
|
2019-06-24 03:21:31 +08:00
|
|
|
|
import name if it can (the required first parameter), to benefit
|
|
|
|
|
tools which build Flask instances programmatically. The Flask class
|
|
|
|
|
will fall back to using import on systems with custom module hooks,
|
|
|
|
|
e.g. Google App Engine, or when the import name is inside a zip
|
|
|
|
|
archive (usually a .egg) prior to Python 2.7.
|
|
|
|
|
- Blueprints now have a decorator to add custom template filters
|
2019-06-27 05:46:10 +08:00
|
|
|
|
application wide, :meth:<3A>flask.Blueprint.app_template_filter<65>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- The Flask and Blueprint classes now have a non-decorator method for
|
|
|
|
|
adding custom template filters application wide,
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:meth:<3A>flask.Flask.add_template_filter<65> and
|
|
|
|
|
:meth:<3A>flask.Blueprint.add_app_template_filter<65>.
|
|
|
|
|
- The :func:<3A>flask.get_flashed_messages<65> function now allows rendering
|
2019-06-24 03:21:31 +08:00
|
|
|
|
flashed message categories in separate blocks, through a
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>category_filter<65><72> argument.
|
|
|
|
|
- The :meth:<3A>flask.Flask.run<75> method now accepts <20><>None<6E><65> for <20><>host<73><74>
|
|
|
|
|
and <20><>port<72><74> arguments, using default values when <20><>None<6E><65>. This
|
2019-06-24 03:21:31 +08:00
|
|
|
|
allows for calling run using configuration values, e.g.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>app.run(app.config.get(<28>MYHOST<53>), app.config.get(<28>MYPORT<52>))<29><>,
|
2019-06-24 03:21:31 +08:00
|
|
|
|
with proper behavior whether or not a config file is provided.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The :meth:<3A>flask.render_template<74> method now accepts a either an
|
2019-06-24 03:21:31 +08:00
|
|
|
|
iterable of template names or a single template name. Previously, it
|
|
|
|
|
only accepted a single template name. On an iterable, the first
|
|
|
|
|
template found is rendered.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :meth:<3A>flask.Flask.app_context<78> which works very similar to
|
2019-06-24 03:21:31 +08:00
|
|
|
|
the request context but only provides access to the current
|
|
|
|
|
application. This also adds support for URL generation without an
|
|
|
|
|
active request context.
|
|
|
|
|
- View functions can now return a tuple with the first instance being
|
2019-06-27 05:46:10 +08:00
|
|
|
|
an instance of :class:<3A>flask.Response<73>. This allows for returning
|
|
|
|
|
<20><>jsonify(error="error msg"), 400<30><30> from a view function.
|
|
|
|
|
- :class:<3A>~flask.Flask<73> and :class:<3A>~flask.Blueprint<6E> now provide a
|
|
|
|
|
:meth:<3A>~flask.Flask.get_send_file_max_age<67> hook for subclasses to
|
2019-06-24 03:21:31 +08:00
|
|
|
|
override behavior of serving static files from Flask when using
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:meth:<3A>flask.Flask.send_static_file<6C> (used for the default static
|
|
|
|
|
file handler) and :func:<3A>~flask.helpers.send_file<6C>. This hook is
|
2019-06-24 03:21:31 +08:00
|
|
|
|
provided a filename, which for example allows changing cache
|
2019-06-27 05:46:10 +08:00
|
|
|
|
controls by file extension. The default max-age for <20><>send_file<6C><65>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
and static files can be configured through a new
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>SEND_FILE_MAX_AGE_DEFAULT<4C><54> configuration variable, which is used
|
|
|
|
|
in the default <20><>get_send_file_max_age<67><65> implementation.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Fixed an assumption in sessions implementation which could break
|
|
|
|
|
message flashing on sessions implementations which use external
|
|
|
|
|
storage.
|
|
|
|
|
- Changed the behavior of tuple return values from functions. They are
|
|
|
|
|
no longer arguments to the response object, they now have a defined
|
|
|
|
|
meaning.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :attr:<3A>flask.Flask.request_globals_class<73> to allow a specific
|
|
|
|
|
class to be used on creation of the :data:<3A>~flask.g<> instance of
|
2019-06-24 03:21:31 +08:00
|
|
|
|
each request.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>required_methods<64><73> attribute to view functions to force-add
|
2019-06-24 03:21:31 +08:00
|
|
|
|
methods on registration.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :func:<3A>flask.after_this_request<73>.
|
|
|
|
|
- Added :func:<3A>flask.stream_with_context<78> and the ability to push
|
2019-06-24 03:21:31 +08:00
|
|
|
|
contexts multiple times without producing unexpected behavior.
|
|
|
|
|
|
2011-10-06 22:57:03 +08:00
|
|
|
|
|
2011-10-02 07:06:22 +08:00
|
|
|
|
Version 0.8.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2012-07-01
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed an issue with the undocumented <20><>flask.session<6F><6E> module to not
|
2019-06-24 03:21:31 +08:00
|
|
|
|
work properly on Python 2.5. It should not be used but did cause
|
|
|
|
|
some problems for package managers.
|
2011-10-02 07:06:22 +08:00
|
|
|
|
|
2011-10-02 07:08:54 +08:00
|
|
|
|
|
2011-07-07 17:26:53 +08:00
|
|
|
|
Version 0.8
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2011-09-29, codename Rakija
|
|
|
|
|
|
|
|
|
|
- Refactored session support into a session interface so that the
|
|
|
|
|
implementation of the sessions can be changed without having to
|
|
|
|
|
override the Flask class.
|
|
|
|
|
- Empty session cookies are now deleted properly automatically.
|
|
|
|
|
- View functions can now opt out of getting the automatic OPTIONS
|
|
|
|
|
implementation.
|
|
|
|
|
- HTTP exceptions and Bad Request errors can now be trapped so that
|
|
|
|
|
they show up normally in the traceback.
|
|
|
|
|
- Flask in debug mode is now detecting some common problems and tries
|
|
|
|
|
to warn you about them.
|
|
|
|
|
- Flask in debug mode will now complain with an assertion error if a
|
|
|
|
|
view was attached after the first request was handled. This gives
|
|
|
|
|
earlier feedback when users forget to import view code ahead of
|
|
|
|
|
time.
|
|
|
|
|
- Added the ability to register callbacks that are only triggered once
|
|
|
|
|
at the beginning of the first request.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
(:meth:<3A>Flask.before_first_request<73>)
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Malformed JSON data will now trigger a bad request HTTP exception
|
|
|
|
|
instead of a value error which usually would result in a 500
|
|
|
|
|
internal server error if not handled. This is a backwards
|
|
|
|
|
incompatible change.
|
|
|
|
|
- Applications now not only have a root path where the resources and
|
|
|
|
|
modules are located but also an instance path which is the
|
|
|
|
|
designated place to drop files that are modified at runtime (uploads
|
|
|
|
|
etc.). Also this is conceptually only instance depending and outside
|
2019-06-27 05:46:10 +08:00
|
|
|
|
version control so it<69>s the perfect place to put configuration files
|
|
|
|
|
etc. For more information see :ref:<3A>instance-folders<72>.
|
|
|
|
|
- Added the <20><>APPLICATION_ROOT<4F><54> configuration variable.
|
|
|
|
|
- Implemented :meth:<3A>~flask.testing.TestClient.session_transaction<6F> to
|
2019-06-24 03:21:31 +08:00
|
|
|
|
easily modify sessions from the test environment.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Refactored test client internally. The <20><>APPLICATION_ROOT<4F><54>
|
|
|
|
|
configuration variable as well as <20><>SERVER_NAME<4D><45> are now properly
|
2019-06-24 03:21:31 +08:00
|
|
|
|
used by the test client as defaults.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :attr:<3A>flask.views.View.decorators<72> to support simpler
|
2019-06-24 03:21:31 +08:00
|
|
|
|
decorating of pluggable (class-based) views.
|
|
|
|
|
- Fixed an issue where the test client if used with the "with"
|
|
|
|
|
statement did not trigger the execution of the teardown handlers.
|
|
|
|
|
- Added finer control over the session cookie parameters.
|
|
|
|
|
- HEAD requests to a method view now automatically dispatch to the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>get<65><74> method if no handler was implemented.
|
|
|
|
|
- Implemented the virtual :mod:<3A>flask.ext<78> package to import
|
2019-06-24 03:21:31 +08:00
|
|
|
|
extensions from.
|
|
|
|
|
- The context preservation on exceptions is now an integral component
|
|
|
|
|
of Flask itself and no longer of the test client. This cleaned up
|
|
|
|
|
some internal logic and lowers the odds of runaway request contexts
|
|
|
|
|
in unittests.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed the Jinja2 environment<6E>s <20><>list_templates<65><73> method not
|
2019-06-24 03:21:31 +08:00
|
|
|
|
returning the correct names when blueprints or modules were
|
|
|
|
|
involved.
|
2011-07-16 07:16:03 +08:00
|
|
|
|
|
|
|
|
|
|
2011-07-06 16:18:03 +08:00
|
|
|
|
Version 0.7.2
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2011-07-06
|
|
|
|
|
|
|
|
|
|
- Fixed an issue with URL processors not properly working on
|
|
|
|
|
blueprints.
|
2011-07-06 16:18:03 +08:00
|
|
|
|
|
|
|
|
|
|
2011-06-29 05:36:39 +08:00
|
|
|
|
Version 0.7.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2011-06-29
|
|
|
|
|
|
|
|
|
|
- Added missing future import that broke 2.5 compatibility.
|
|
|
|
|
- Fixed an infinite redirect issue with blueprints.
|
2011-06-29 05:36:39 +08:00
|
|
|
|
|
|
|
|
|
|
2010-07-27 20:40:21 +08:00
|
|
|
|
Version 0.7
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2011-06-28, codename Grappa
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :meth:<3A>~flask.Flask.make_default_options_response<73> which can
|
|
|
|
|
be used by subclasses to alter the default behavior for <20><>OPTIONS<4E><53>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
responses.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Unbound locals now raise a proper :exc:<3A>RuntimeError<6F> instead of an
|
|
|
|
|
:exc:<3A>AttributeError<6F>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Mimetype guessing and etag support based on file objects is now
|
2019-06-27 05:46:10 +08:00
|
|
|
|
deprecated for :func:<3A>flask.send_file<6C> because it was unreliable.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Pass filenames instead or attach your own etags and provide a proper
|
|
|
|
|
mimetype by hand.
|
|
|
|
|
- Static file handling for modules now requires the name of the static
|
|
|
|
|
folder to be supplied explicitly. The previous autodetection was not
|
2019-06-27 05:46:10 +08:00
|
|
|
|
reliable and caused issues on Google<6C>s App Engine. Until 1.0 the old
|
2019-06-24 03:21:31 +08:00
|
|
|
|
behavior will continue to work but issue dependency warnings.
|
|
|
|
|
- Fixed a problem for Flask to run on jython.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added a <20><>PROPAGATE_EXCEPTIONS<4E><53> configuration variable that can be
|
2019-06-24 03:21:31 +08:00
|
|
|
|
used to flip the setting of exception propagation which previously
|
2019-06-27 05:46:10 +08:00
|
|
|
|
was linked to <20><>DEBUG<55><47> alone and is now linked to either <20><>DEBUG<55><47>
|
|
|
|
|
or <20><>TESTING<4E><47>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Flask no longer internally depends on rules being added through the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>add_url_rule<6C><65> function and can now also accept regular werkzeug
|
2019-06-24 03:21:31 +08:00
|
|
|
|
rules added to the url map.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added an <20><>endpoint<6E><74> method to the flask application object which
|
2019-06-24 03:21:31 +08:00
|
|
|
|
allows one to register a callback to an arbitrary endpoint with a
|
|
|
|
|
decorator.
|
|
|
|
|
- Use Last-Modified for static file sending instead of Date which was
|
|
|
|
|
incorrectly introduced in 0.6.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>create_jinja_loader<65><72> to override the loader creation
|
2019-06-24 03:21:31 +08:00
|
|
|
|
process.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Implemented a silent flag for <20><>config.from_pyfile<6C><65>.
|
|
|
|
|
- Added <20><>teardown_request<73><74> decorator, for functions that should run
|
2019-06-24 03:21:31 +08:00
|
|
|
|
at the end of a request regardless of whether an exception occurred.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
Also the behavior for <20><>after_request<73><74> was changed. It<49>s now no
|
2019-06-24 03:21:31 +08:00
|
|
|
|
longer executed when an exception is raised. See
|
2019-06-27 05:46:10 +08:00
|
|
|
|
:ref:<3A>upgrading-to-new-teardown-handling<6E>
|
|
|
|
|
- Implemented :func:<3A>flask.has_request_context<78>
|
|
|
|
|
- Deprecated <20><>init_jinja_globals<6C><73>. Override the
|
|
|
|
|
:meth:<3A>~flask.Flask.create_jinja_environment<6E> method instead to
|
2019-06-24 03:21:31 +08:00
|
|
|
|
achieve the same functionality.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :func:<3A>flask.safe_join<69>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- The automatic JSON request data unpacking now looks at the charset
|
|
|
|
|
mimetype parameter.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Don<6F>t modify the session on :func:<3A>flask.get_flashed_messages<65> if
|
2019-06-24 03:21:31 +08:00
|
|
|
|
there are no messages in the session.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- <20><>before_request<73><74> handlers are now able to abort requests with
|
2019-06-24 03:21:31 +08:00
|
|
|
|
errors.
|
|
|
|
|
- It is not possible to define user exception handlers. That way you
|
|
|
|
|
can provide custom error messages from a central hub for certain
|
|
|
|
|
errors that might occur during request processing (for instance
|
|
|
|
|
database connection errors, timeouts from remote resources etc.).
|
|
|
|
|
- Blueprints can provide blueprint specific error handlers.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Implemented generic :ref:<3A>views<77> (class-based views).
|
2019-06-24 03:21:31 +08:00
|
|
|
|
|
2010-07-28 07:39:25 +08:00
|
|
|
|
|
2010-07-28 07:26:15 +08:00
|
|
|
|
Version 0.6.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-12-31
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed an issue where the default <20><>OPTIONS<4E><53> response was not
|
|
|
|
|
exposing all valid methods in the <20><>Allow<6F><77> header.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Jinja2 template loading syntax now allows "./" in front of a
|
|
|
|
|
template load path. Previously this caused issues with module
|
|
|
|
|
setups.
|
|
|
|
|
- Fixed an issue where the subdomain setting for modules was ignored
|
|
|
|
|
for the static folder.
|
|
|
|
|
- Fixed a security problem that allowed clients to download arbitrary
|
|
|
|
|
files if the host server was a windows based operating system and
|
|
|
|
|
the client uses backslashes to escape the directory the files where
|
|
|
|
|
exposed from.
|
2010-07-27 20:40:21 +08:00
|
|
|
|
|
2010-07-28 07:25:08 +08:00
|
|
|
|
|
2010-07-06 22:28:47 +08:00
|
|
|
|
Version 0.6
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-07-27, codename Whisky
|
|
|
|
|
|
|
|
|
|
- After request functions are now called in reverse order of
|
|
|
|
|
registration.
|
|
|
|
|
- OPTIONS is now automatically implemented by Flask unless the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
application explicitly adds <20>OPTIONS<4E> as method to the URL rule. In
|
2019-06-24 03:21:31 +08:00
|
|
|
|
this case no automatic OPTIONS handling kicks in.
|
|
|
|
|
- Static rules are now even in place if there is no static folder for
|
|
|
|
|
the module. This was implemented to aid GAE which will remove the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
static folder if it<69>s part of a mapping in the .yml file.
|
|
|
|
|
- The :attr:<3A>~flask.Flask.config<69> is now available in the templates as
|
|
|
|
|
<20><>config<69><67>.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Context processors will no longer override values passed directly to
|
|
|
|
|
the render function.
|
|
|
|
|
- Added the ability to limit the incoming request data with the new
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>MAX_CONTENT_LENGTH<54><48> configuration value.
|
|
|
|
|
- The endpoint for the :meth:<3A>flask.Module.add_url_rule<6C> method is now
|
2019-06-24 03:21:31 +08:00
|
|
|
|
optional to be consistent with the function of the same name on the
|
|
|
|
|
application object.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added a :func:<3A>flask.make_response<73> function that simplifies
|
2019-06-24 03:21:31 +08:00
|
|
|
|
creating response object instances in views.
|
|
|
|
|
- Added signalling support based on blinker. This feature is currently
|
|
|
|
|
optional and supposed to be used by extensions and applications. If
|
2019-06-27 05:46:10 +08:00
|
|
|
|
you want to use it, make sure to have <20>blinker<65>_ installed.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Refactored the way URL adapters are created. This process is now
|
2019-06-27 05:46:10 +08:00
|
|
|
|
fully customizable with the :meth:<3A>~flask.Flask.create_url_adapter<65>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
method.
|
|
|
|
|
- Modules can now register for a subdomain instead of just an URL
|
|
|
|
|
prefix. This makes it possible to bind a whole module to a
|
|
|
|
|
configurable subdomain.
|
2010-07-17 20:39:28 +08:00
|
|
|
|
|
2018-04-13 13:54:11 +08:00
|
|
|
|
.. _blinker: https://pypi.org/project/blinker/
|
2010-07-13 00:04:10 +08:00
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
|
2010-07-16 02:03:58 +08:00
|
|
|
|
Version 0.5.2
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-07-15
|
|
|
|
|
|
|
|
|
|
- Fixed another issue with loading templates from directories when
|
|
|
|
|
modules were used.
|
2010-07-16 02:03:58 +08:00
|
|
|
|
|
|
|
|
|
|
2010-07-07 01:11:51 +08:00
|
|
|
|
Version 0.5.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-07-06
|
|
|
|
|
|
|
|
|
|
- Fixes an issue with template loading from directories when modules
|
|
|
|
|
where used.
|
2010-07-07 01:11:51 +08:00
|
|
|
|
|
|
|
|
|
|
2010-06-18 23:14:43 +08:00
|
|
|
|
Version 0.5
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-07-06, codename Calvados
|
|
|
|
|
|
|
|
|
|
- Fixed a bug with subdomains that was caused by the inability to
|
|
|
|
|
specify the server name. The server name can now be set with the
|
2019-06-27 05:46:10 +08:00
|
|
|
|
<20><>SERVER_NAME<4D><45> config key. This key is now also used to set the
|
2019-06-24 03:21:31 +08:00
|
|
|
|
session cookie cross-subdomain wide.
|
|
|
|
|
- Autoescaping is no longer active for all templates. Instead it is
|
2019-06-27 05:46:10 +08:00
|
|
|
|
only active for <20><>.html<6D><6C>, <20><>.htm<74><6D>, <20><>.xml<6D><6C> and <20><>.xhtml<6D><6C>. Inside
|
|
|
|
|
templates this behavior can be changed with the <20><>autoescape<70><65> tag.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Refactored Flask internally. It now consists of more than a single
|
|
|
|
|
file.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :func:<3A>flask.send_file<6C> now emits etags and has the ability to do
|
2019-06-24 03:21:31 +08:00
|
|
|
|
conditional responses builtin.
|
|
|
|
|
- (temporarily) dropped support for zipped applications. This was a
|
|
|
|
|
rarely used feature and led to some confusing behavior.
|
|
|
|
|
- Added support for per-package template and static-file directories.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Removed support for <20><>create_jinja_loader<65><72> which is no longer used
|
2019-06-24 03:21:31 +08:00
|
|
|
|
in 0.5 due to the improved module support.
|
|
|
|
|
- Added a helper function to expose files from any directory.
|
|
|
|
|
|
2010-06-29 07:13:40 +08:00
|
|
|
|
|
2010-05-28 07:25:19 +08:00
|
|
|
|
Version 0.4
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-06-18, codename Rakia
|
|
|
|
|
|
|
|
|
|
- Added the ability to register application wide error handlers from
|
|
|
|
|
modules.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- :meth:<3A>~flask.Flask.after_request<73> handlers are now also invoked if
|
2019-06-24 03:21:31 +08:00
|
|
|
|
the request dies with an exception and an error handling page kicks
|
|
|
|
|
in.
|
|
|
|
|
- Test client has not the ability to preserve the request context for
|
|
|
|
|
a little longer. This can also be used to trigger custom requests
|
|
|
|
|
that do not pop the request stack for testing.
|
|
|
|
|
- Because the Python standard library caches loggers, the name of the
|
|
|
|
|
logger is configurable now to better support unittests.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added <20><>TESTING<4E><47> switch that can activate unittesting helpers.
|
|
|
|
|
- The logger switches to <20><>DEBUG<55><47> mode now if debug is enabled.
|
2019-06-24 03:21:31 +08:00
|
|
|
|
|
2010-05-31 23:38:05 +08:00
|
|
|
|
|
2010-05-29 03:06:39 +08:00
|
|
|
|
Version 0.3.1
|
|
|
|
|
-------------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-05-28
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Fixed a error reporting bug with :meth:<3A>flask.Config.from_envvar<61>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Removed some unused code from flask
|
|
|
|
|
- Release does no longer include development leftover files (.git
|
|
|
|
|
folder for themes, built documentation in zip and pdf file and some
|
|
|
|
|
.pyc files)
|
2010-05-29 03:06:39 +08:00
|
|
|
|
|
|
|
|
|
|
2010-05-28 07:18:29 +08:00
|
|
|
|
Version 0.3
|
2010-05-12 07:32:29 +08:00
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-05-28, codename Schnaps
|
|
|
|
|
|
|
|
|
|
- Added support for categories for flashed messages.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- The application now configures a :class:<3A>logging.Handler<65> and will
|
2019-06-24 03:21:31 +08:00
|
|
|
|
log request handling exceptions to that logger when not in debug
|
|
|
|
|
mode. This makes it possible to receive mails on server errors for
|
|
|
|
|
example.
|
|
|
|
|
- Added support for context binding that does not require the use of
|
|
|
|
|
the with statement for playing in the console.
|
|
|
|
|
- The request context is now available within the with statement
|
|
|
|
|
making it possible to further push the request context or pop it.
|
|
|
|
|
- Added support for configurations.
|
2010-05-12 07:32:29 +08:00
|
|
|
|
|
2010-05-17 06:37:55 +08:00
|
|
|
|
|
2010-04-21 02:21:01 +08:00
|
|
|
|
Version 0.2
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-27 05:46:10 +08:00
|
|
|
|
Released 2010-05-12, codename J?germeister
|
2019-06-24 03:21:31 +08:00
|
|
|
|
|
|
|
|
|
- Various bugfixes
|
|
|
|
|
- Integrated JSON support
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added :func:<3A>~flask.get_template_attribute<74> helper function.
|
|
|
|
|
- :meth:<3A>~flask.Flask.add_url_rule<6C> can now also register a view
|
2019-06-24 03:21:31 +08:00
|
|
|
|
function.
|
|
|
|
|
- Refactored internal request dispatching.
|
|
|
|
|
- Server listens on 127.0.0.1 by default now to fix issues with
|
|
|
|
|
chrome.
|
|
|
|
|
- Added external URL support.
|
2019-06-27 05:46:10 +08:00
|
|
|
|
- Added support for :func:<3A>~flask.send_file<6C>
|
2019-06-24 03:21:31 +08:00
|
|
|
|
- Module support and internal request handling refactoring to better
|
|
|
|
|
support pluggable applications.
|
|
|
|
|
- Sessions can be set to be permanent now on a per-session basis.
|
|
|
|
|
- Better error reporting on missing secret keys.
|
|
|
|
|
- Added support for Google Appengine.
|
|
|
|
|
|
2010-04-21 02:21:01 +08:00
|
|
|
|
|
|
|
|
|
Version 0.1
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-24 03:21:31 +08:00
|
|
|
|
Released 2010-04-16
|
|
|
|
|
|
|
|
|
|
- First public preview release.
|