Merge remote-tracking branch 'remotes/origin/master' into json-mixin
This commit is contained in:
commit
dbc70c9274
135 changed files with 5600 additions and 2991 deletions
131
CHANGES
131
CHANGES
|
|
@ -3,12 +3,127 @@ Flask Changelog
|
|||
|
||||
Here you can see the full list of changes between each Flask release.
|
||||
|
||||
Version 0.13
|
||||
------------
|
||||
|
||||
Major release, unreleased
|
||||
|
||||
- Minimum Werkzeug version bumped to 0.9, but please use the latest version.
|
||||
- Minimum Click version bumped to 4, but please use the latest version.
|
||||
- Make ``app.run()`` into a noop if a Flask application is run from the
|
||||
development server on the command line. This avoids some behavior that
|
||||
was confusing to debug for newcomers.
|
||||
- Change default configuration ``JSONIFY_PRETTYPRINT_REGULAR=False``.
|
||||
``jsonify()`` method returns compressed response by default, and pretty
|
||||
response in debug mode. (`#2193`_)
|
||||
- Change ``Flask.__init__`` to accept two new keyword arguments,
|
||||
``host_matching`` and ``static_host``. This enables ``host_matching`` to be
|
||||
set properly by the time the constructor adds the static route, and enables
|
||||
the static route to be properly associated with the required host.
|
||||
(``#1559``)
|
||||
- ``send_file`` supports Unicode in ``attachment_filename``. (`#2223`_)
|
||||
- Pass ``_scheme`` argument from ``url_for`` to ``handle_build_error``.
|
||||
(`#2017`_)
|
||||
- Add support for ``provide_automatic_options`` in ``add_url_rule`` to disable
|
||||
adding OPTIONS method when the ``view_func`` argument is not a class.
|
||||
(`#1489`_).
|
||||
- ``MethodView`` can inherit method handlers from base classes. (`#1936`_)
|
||||
- Errors caused while opening the session at the beginning of the request are
|
||||
handled by the app's error handlers. (`#2254`_)
|
||||
- Blueprints gained ``json_encoder`` and ``json_decoder`` attributes to
|
||||
override the app's encoder and decoder. (`#1898`_)
|
||||
- ``Flask.make_response`` raises ``TypeError`` instead of ``ValueError`` for
|
||||
bad response types. The error messages have been improved to describe why the
|
||||
type is invalid. (`#2256`_)
|
||||
- Add ``routes`` CLI command to output routes registered on the application.
|
||||
(`#2259`_)
|
||||
- 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 Chrome.
|
||||
(`#2282`_)
|
||||
- Allow IP address as exact session cookie domain. (`#2282`_)
|
||||
- ``SESSION_COOKIE_DOMAIN`` is set if it is detected through ``SERVER_NAME``.
|
||||
(`#2282`_)
|
||||
- Auto-detect zero-argument app factory called ``create_app`` or ``make_app``
|
||||
from ``FLASK_APP``. (`#2297`_)
|
||||
- Factory functions are not required to take a ``script_info`` parameter to
|
||||
work with the ``flask`` command. If they take a single parameter or a
|
||||
parameter named ``script_info``, the ``ScriptInfo`` object will be passed.
|
||||
(`#2319`_)
|
||||
- FLASK_APP=myproject.app:create_app('dev') support.
|
||||
- ``FLASK_APP`` can be set to an app factory, with arguments if needed, for
|
||||
example ``FLASK_APP=myproject.app:create_app('dev')``. (`#2326`_)
|
||||
- ``View.provide_automatic_options = True`` is set on the view function from
|
||||
``View.as_view``, to be detected in ``app.add_url_rule``. (`#2316`_)
|
||||
- Error handling will try handlers registered for ``blueprint, code``,
|
||||
``app, code``, ``blueprint, exception``, ``app, exception``. (`#2314`_)
|
||||
- ``Cookie`` is added to the response's ``Vary`` header if the session is
|
||||
accessed at all during the request (and it wasn't deleted). (`#2288`_)
|
||||
- ``app.test_request_context()`` take ``subdomain`` and ``url_scheme``
|
||||
parameters for use when building base URL. (`#1621`_)
|
||||
- Set ``APPLICATION_ROOT = '/'`` by default. This was already the implicit
|
||||
default when it was set to ``None``.
|
||||
- ``TRAP_BAD_REQUEST_ERRORS`` is enabled by default in debug mode.
|
||||
``BadRequestKeyError`` has a message with the bad key in debug mode instead
|
||||
of the generic bad request message. (`#2348`_)
|
||||
- Allow registering new tags with ``TaggedJSONSerializer`` to support
|
||||
storing other types in the session cookie. (`#2352`_)
|
||||
- Only open the session if the request has not been pushed onto the context
|
||||
stack yet. This allows ``stream_with_context`` generators to access the same
|
||||
session that the containing view uses. (`#2354`_)
|
||||
|
||||
.. _#1489: https://github.com/pallets/flask/pull/1489
|
||||
.. _#1621: https://github.com/pallets/flask/pull/1621
|
||||
.. _#1898: https://github.com/pallets/flask/pull/1898
|
||||
.. _#1936: https://github.com/pallets/flask/pull/1936
|
||||
.. _#2017: https://github.com/pallets/flask/pull/2017
|
||||
.. _#2193: https://github.com/pallets/flask/pull/2193
|
||||
.. _#2223: https://github.com/pallets/flask/pull/2223
|
||||
.. _#2254: https://github.com/pallets/flask/pull/2254
|
||||
.. _#2256: https://github.com/pallets/flask/pull/2256
|
||||
.. _#2259: https://github.com/pallets/flask/pull/2259
|
||||
.. _#2282: https://github.com/pallets/flask/pull/2282
|
||||
.. _#2288: https://github.com/pallets/flask/pull/2288
|
||||
.. _#2297: https://github.com/pallets/flask/pull/2297
|
||||
.. _#2314: https://github.com/pallets/flask/pull/2314
|
||||
.. _#2316: https://github.com/pallets/flask/pull/2316
|
||||
.. _#2319: https://github.com/pallets/flask/pull/2319
|
||||
.. _#2326: https://github.com/pallets/flask/pull/2326
|
||||
.. _#2348: https://github.com/pallets/flask/pull/2348
|
||||
.. _#2352: https://github.com/pallets/flask/pull/2352
|
||||
.. _#2354: https://github.com/pallets/flask/pull/2354
|
||||
|
||||
Version 0.12.2
|
||||
--------------
|
||||
|
||||
Released on May 16 2017
|
||||
|
||||
- Fix a bug in `safe_join` on Windows.
|
||||
|
||||
Version 0.12.1
|
||||
--------------
|
||||
|
||||
Bugfix release, released on March 31st 2017
|
||||
|
||||
- Prevent `flask run` from showing a NoAppException when an ImportError occurs
|
||||
within the imported application module.
|
||||
- Fix encoding behavior of ``app.config.from_pyfile`` for Python 3. Fix
|
||||
``#2118``.
|
||||
- Use the ``SERVER_NAME`` config if it is present as default values for
|
||||
``app.run``. ``#2109``, ``#2152``
|
||||
- Call `ctx.auto_pop` with the exception object instead of `None`, in the
|
||||
event that a `BaseException` such as `KeyboardInterrupt` is raised in a
|
||||
request handler.
|
||||
|
||||
Version 0.12
|
||||
------------
|
||||
|
||||
Released on December 21st 2016, codename Punsch.
|
||||
|
||||
- the cli command now responds to `--version`.
|
||||
- Mimetype guessing for ``send_file`` has been removed, as per issue ``#104``.
|
||||
See pull request ``#1849``.
|
||||
- Mimetype guessing and ETag generation for file-like objects in ``send_file``
|
||||
has been removed, as per issue ``#104``. See pull request ``#1849``.
|
||||
- Mimetype guessing in ``send_file`` now fails loudly and doesn't fall back to
|
||||
``application/octet-stream``. See pull request ``#1988``.
|
||||
- Make ``flask.safe_join`` able to join multiple paths like ``os.path.join``
|
||||
(pull request ``#1730``).
|
||||
- Added `json` keyword argument to :meth:`flask.testing.FlaskClient.open`
|
||||
|
|
@ -16,6 +131,14 @@ Version 0.12
|
|||
send JSON requests from the test client.
|
||||
- Added ``is_json`` and ``get_json`` to :class:``flask.wrappers.Response``
|
||||
in order to make it easier to build assertions when testing JSON responses.
|
||||
- Revert a behavior change that made the dev server crash instead of returning
|
||||
a Internal Server Error (pull request ``#2006``).
|
||||
- Correctly invoke response handlers for both regular request dispatching as
|
||||
well as error handlers.
|
||||
- Disable logger propagation by default for the app logger.
|
||||
- Add support for range requests in ``send_file``.
|
||||
- ``app.test_client`` includes preset default environment, which can now be
|
||||
directly set, instead of per ``client.get``.
|
||||
|
||||
Version 0.11.2
|
||||
--------------
|
||||
|
|
@ -99,6 +222,8 @@ Released on May 29th 2016, codename Absinthe.
|
|||
- Don't leak exception info of already catched exceptions to context teardown
|
||||
handlers (pull request ``#1393``).
|
||||
- Allow custom Jinja environment subclasses (pull request ``#1422``).
|
||||
- Updated extension dev guidelines.
|
||||
|
||||
- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.
|
||||
- Turn on autoescape for ``flask.templating.render_template_string`` by default
|
||||
(pull request ``#1515``).
|
||||
|
|
@ -330,7 +455,7 @@ Released on September 29th 2011, codename Rakija
|
|||
- 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
|
||||
conceptionally only instance depending and outside version control so it's
|
||||
conceptually only instance depending and outside version control so it's
|
||||
the perfect place to put configuration files etc. For more information
|
||||
see :ref:`instance-folders`.
|
||||
- Added the ``APPLICATION_ROOT`` configuration variable.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue