forked from orbit-oss/flask
resolve merge conflicts
This commit is contained in:
commit
31174fecd2
168 changed files with 6384 additions and 3932 deletions
143
CHANGES
143
CHANGES
|
|
@ -3,11 +3,129 @@ Flask Changelog
|
|||
|
||||
Here you can see the full list of changes between each Flask release.
|
||||
|
||||
Version 1.0
|
||||
-----------
|
||||
Version 0.13
|
||||
------------
|
||||
|
||||
(release date to be announced, codename to be selected)
|
||||
Major release, unreleased
|
||||
|
||||
- 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.
|
||||
- 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`_)
|
||||
|
||||
.. _#1489: https://github.com/pallets/flask/pull/1489
|
||||
.. _#1898: https://github.com/pallets/flask/pull/1898
|
||||
.. _#1936: https://github.com/pallets/flask/pull/1936
|
||||
.. _#2017: https://github.com/pallets/flask/pull/2017
|
||||
.. _#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
|
||||
.. _#2297: https://github.com/pallets/flask/pull/2297
|
||||
.. _#2319: https://github.com/pallets/flask/pull/2319
|
||||
|
||||
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 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``).
|
||||
- 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
|
||||
--------------
|
||||
|
||||
Bugfix release, unreleased
|
||||
|
||||
- Fix crash when running under PyPy3, see pull request ``#1814``.
|
||||
|
||||
Version 0.11.1
|
||||
--------------
|
||||
|
||||
Bugfix release, released on June 7th 2016.
|
||||
|
||||
- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from working. See
|
||||
pull request ``#1872``.
|
||||
|
||||
Version 0.11
|
||||
------------
|
||||
|
||||
Released on May 29th 2016, codename Absinthe.
|
||||
|
||||
- Added support to serializing top-level arrays to :func:`flask.jsonify`. This
|
||||
introduces a security risk in ancient browsers. See
|
||||
:ref:`json-security` for details.
|
||||
- Added before_render_template signal.
|
||||
- Added `**kwargs` to :meth:`flask.Test.test_client` to support passing
|
||||
additional keyword arguments to the constructor of
|
||||
:attr:`flask.Flask.test_client_class`.
|
||||
|
|
@ -22,7 +140,7 @@ Version 1.0
|
|||
from a view function.
|
||||
- Added :meth:`flask.Config.from_json`.
|
||||
- Added :attr:`flask.Flask.config_class`.
|
||||
- Added :meth:`flask.config.Config.get_namespace`.
|
||||
- Added :meth:`flask.Config.get_namespace`.
|
||||
- Templates are no longer automatically reloaded outside of debug mode. This
|
||||
can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config key.
|
||||
- Added a workaround for a limitation in Python 3.3's namespace loader.
|
||||
|
|
@ -56,7 +174,7 @@ Version 1.0
|
|||
- JSON responses are now terminated with a newline character, because it is a
|
||||
convention that UNIX text files end with a newline and some clients don't
|
||||
deal well when this newline is missing. See
|
||||
https://github.com/mitsuhiko/flask/pull/1262 -- this came up originally as a
|
||||
https://github.com/pallets/flask/pull/1262 -- this came up originally as a
|
||||
part of https://github.com/kennethreitz/httpbin/issues/168
|
||||
- The automatically provided ``OPTIONS`` method is now correctly disabled if
|
||||
the user registered an overriding rule with the lowercase-version
|
||||
|
|
@ -68,6 +186,15 @@ Version 1.0
|
|||
- 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``).
|
||||
- ``flask.ext`` is now deprecated (pull request ``#1484``).
|
||||
- ``send_from_directory`` now raises BadRequest if the filename is invalid on
|
||||
the server OS (pull request ``#1763``).
|
||||
- Added the ``JSONIFY_MIMETYPE`` configuration variable (pull request ``#1728``).
|
||||
- Exceptions during teardown handling will no longer leave bad application
|
||||
contexts lingering around.
|
||||
|
||||
Version 0.10.2
|
||||
--------------
|
||||
|
|
@ -89,6 +216,8 @@ Version 0.10.2
|
|||
- 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 `app.url_build_error_handlers`
|
||||
reraises the `BuildError`.
|
||||
|
||||
Version 0.10.1
|
||||
--------------
|
||||
|
|
@ -108,7 +237,7 @@ Version 0.10.1
|
|||
Version 0.10
|
||||
------------
|
||||
|
||||
Released on June 13nd 2013, codename Limoncello.
|
||||
Released on June 13th 2013, 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
|
||||
|
|
@ -288,7 +417,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