Skip to content
Myr

use sphinx-issues, rewrap changelog

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 24498af · Browse files · 2 files+604 added−650 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+604 added−650 removed

  • other:+604 added−650 removed

2 files+604 added−650 removed

modified:docs/changelog.rst+3 added
1Changelog2=========34.. include:: ../CHANGES.rst
modified:CHANGES.rst+601 added-650 removed
1.. currentmodule:: flask23Flask Changelog4===============563Version 1.0.34-------------56Released 2019-05-1778- :func:`send_file` encodes filenames as ASCII instead of Latin-19 (ISO-8859-1). This fixes compatibility with Gunicorn, which is14 stricter about header encodings than PEP 3333. (`#2766`_)10 stricter about header encodings than PEP 3333. :issue:`2766`11- Allow custom CLIs using ``FlaskGroup`` to set the debug flag without12 it always being overwritten based on environment variables.17 (`#2765`_)13 :pr:`2765`14- ``flask --version`` outputs Werkzeug's version and simplifies the19 Python version. (`#2825`_)15 Python version. :pr:`2825`16- :func:`send_file` handles an ``attachment_filename`` that is a21 native Python 2 string (bytes) with UTF-8 coded bytes. (`#2933`_)17 native Python 2 string (bytes) with UTF-8 coded bytes. :issue:`2933`18- A catch-all error handler registered for ``HTTPException`` will not19 handle ``RoutingExcpetion``, which is used internally during20 routing. This fixes the unexpected behavior that had been introduced25 in 1.0. (`#2986`_)21 in 1.0. :pr:`2986`22- Passing the ``json`` argument to ``app.test_client`` does not27 push/pop an extra app context. (`#2900`_)23 push/pop an extra app context. :issue:`2900`2429.. _#2766: https://github.com/pallets/flask/issues/276630.. _#2765: https://github.com/pallets/flask/pull/276531.. _#2825: https://github.com/pallets/flask/pull/282532.. _#2900: https://github.com/pallets/flask/issues/290033.. _#2933: https://github.com/pallets/flask/issues/293334.. _#2986: https://github.com/pallets/flask/pull/2986253626Version 1.0.227-------------2829Released 2018-05-023031- Fix more backwards compatibility issues with merging slashes between43 a blueprint prefix and route. (`#2748`_)32 a blueprint prefix and route. :pr:`2748`33- Fix error with ``flask routes`` command when there are no routes.45 (`#2751`_)34 :issue:`2751`3547.. _#2748: https://github.com/pallets/flask/pull/274848.. _#2751: https://github.com/pallets/flask/issues/2751365037Version 1.0.138-------------3940Released 2018-04-294142- Fix registering partials (with no ``__name__``) as view functions.57 (`#2730`_)43 :pr:`2730`44- Don't treat lists returned from view functions the same as tuples.59 Only tuples are interpreted as response data. (`#2736`_)45 Only tuples are interpreted as response data. :issue:`2736`46- Extra slashes between a blueprint's ``url_prefix`` and a route URL47 are merged. This fixes some backwards compatibility issues with the62 change in 1.0. (`#2731`_, `#2742`_)48 change in 1.0. :issue:`2731`, :issue:`2742`49- Only trap ``BadRequestKeyError`` errors in debug mode, not all50 ``BadRequest`` errors. This allows ``abort(400)`` to continue65 working as expected. (`#2735`_)51 working as expected. :issue:`2735`52- The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1``67 to skip automatically loading dotenv files. (`#2722`_)53 to skip automatically loading dotenv files. :issue:`2722`5469.. _#2722: https://github.com/pallets/flask/issues/272270.. _#2730: https://github.com/pallets/flask/pull/273071.. _#2731: https://github.com/pallets/flask/issues/273172.. _#2735: https://github.com/pallets/flask/issues/273573.. _#2736: https://github.com/pallets/flask/issues/273674.. _#2742: https://github.com/pallets/flask/issues/2742557656Version 1.057-----------5859Released 2018-04-266082- **Python 2.6 and 3.3 are no longer supported.** (`pallets/meta#24`_)61- Python 2.6 and 3.3 are no longer supported.62- Bump minimum dependency versions to the latest stable versions:63 Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1.85 (`#2586`_)64 :issue:`2586`65- Skip :meth:`app.run <Flask.run>` when a Flask application is run66 from the command line. This avoids some behavior that was confusing67 to debug.68- Change the default for :data:`JSONIFY_PRETTYPRINT_REGULAR` to69 ``False``. :func:`~json.jsonify` returns a compact format by91 default, and an indented format in debug mode. (`#2193`_)70 default, and an indented format in debug mode. :pr:`2193`71- :meth:`Flask.__init__ <Flask>` accepts the ``host_matching``93 argument and sets it on :attr:`~Flask.url_map`. (`#1559`_)72 argument and sets it on :attr:`~Flask.url_map`. :issue:`1559`73- :meth:`Flask.__init__ <Flask>` accepts the ``static_host`` argument74 and passes it as the ``host`` argument when defining the static96 route. (`#1559`_)75 route. :issue:`1559`76- :func:`send_file` supports Unicode in ``attachment_filename``.98 (`#2223`_)77 :pr:`2223`78- Pass ``_scheme`` argument from :func:`url_for` to100 :meth:`~Flask.handle_url_build_error`. (`#2017`_)79 :meth:`~Flask.handle_url_build_error`. :pr:`2017`80- :meth:`~Flask.add_url_rule` accepts the81 ``provide_automatic_options`` argument to disable adding the103 ``OPTIONS`` method. (`#1489`_)82 ``OPTIONS`` method. :pr:`1489`83- :class:`~views.MethodView` subclasses inherit method handlers from105 base classes. (`#1936`_)84 base classes. :pr:`1936`85- Errors caused while opening the session at the beginning of the107 request are handled by the app's error handlers. (`#2254`_)86 request are handled by the app's error handlers. :pr:`2254`87- Blueprints gained :attr:`~Blueprint.json_encoder` and88 :attr:`~Blueprint.json_decoder` attributes to override the app's110 encoder and decoder. (`#1898`_)89 encoder and decoder. :pr:`1898`90- :meth:`Flask.make_response` raises ``TypeError`` instead of91 ``ValueError`` for bad response types. The error messages have been113 improved to describe why the type is invalid. (`#2256`_)92 improved to describe why the type is invalid. :pr:`2256`93- Add ``routes`` CLI command to output routes registered on the115 application. (`#2259`_)94 application. :pr:`2259`95- Show warning when session cookie domain is a bare hostname or an IP96 address, as these may not behave properly in some browsers, such as118 Chrome. (`#2282`_)119- Allow IP address as exact session cookie domain. (`#2282`_)97 Chrome. :pr:`2282`98- Allow IP address as exact session cookie domain. :pr:`2282`99- ``SESSION_COOKIE_DOMAIN`` is set if it is detected through121 ``SERVER_NAME``. (`#2282`_)100 ``SERVER_NAME``. :pr:`2282`101- Auto-detect zero-argument app factory called ``create_app`` or123 ``make_app`` from ``FLASK_APP``. (`#2297`_)102 ``make_app`` from ``FLASK_APP``. :pr:`2297`103- Factory functions are not required to take a ``script_info``104 parameter to work with the ``flask`` command. If they take a single105 parameter or a parameter named ``script_info``, the127 :class:`~cli.ScriptInfo` object will be passed. (`#2319`_)106 :class:`~cli.ScriptInfo` object will be passed. :pr:`2319`107- ``FLASK_APP`` can be set to an app factory, with arguments if108 needed, for example ``FLASK_APP=myproject.app:create_app('dev')``.130 (`#2326`_)109 :pr:`2326`110- ``FLASK_APP`` can point to local packages that are not installed in111 editable mode, although ``pip install -e`` is still preferred.133 (`#2414`_)112 :pr:`2414`113- The :class:`~views.View` class attribute114 :attr:`~views.View.provide_automatic_options` is set in115 :meth:`~views.View.as_view`, to be detected by137 :meth:`~Flask.add_url_rule`. (`#2316`_)116 :meth:`~Flask.add_url_rule`. :pr:`2316`117- Error handling will try handlers registered for ``blueprint, code``,118 ``app, code``, ``blueprint, exception``, ``app, exception``.140 (`#2314`_)119 :pr:`2314`120- ``Cookie`` is added to the response's ``Vary`` header if the session142 is accessed at all during the request (and not deleted). (`#2288`_)121 is accessed at all during the request (and not deleted). :pr:`2288`122- :meth:`~Flask.test_request_context` accepts ``subdomain`` and123 ``url_scheme`` arguments for use when building the base URL.145 (`#1621`_)124 :pr:`1621`125- Set :data:`APPLICATION_ROOT` to ``'/'`` by default. This was already126 the implicit default when it was set to ``None``.127- :data:`TRAP_BAD_REQUEST_ERRORS` is enabled by default in debug mode.128 ``BadRequestKeyError`` has a message with the bad key in debug mode150 instead of the generic bad request message. (`#2348`_)129 instead of the generic bad request message. :pr:`2348`130- Allow registering new tags with131 :class:`~json.tag.TaggedJSONSerializer` to support storing other153 types in the session cookie. (`#2352`_)132 types in the session cookie. :pr:`2352`133- Only open the session if the request has not been pushed onto the134 context stack yet. This allows :func:`~stream_with_context`135 generators to access the same session that the containing view uses.157 (`#2354`_)136 :pr:`2354`137- Add ``json`` keyword argument for the test client request methods.138 This will dump the given object as JSON and set the appropriate160 content type. (`#2358`_)139 content type. :pr:`2358`140- Extract JSON handling to a mixin applied to both the141 :class:`Request` and :class:`Response` classes. This adds the142 :meth:`~Response.is_json` and :meth:`~Response.get_json` methods to164 the response to make testing JSON response much easier. (`#2358`_)143 the response to make testing JSON response much easier. :pr:`2358`144- Removed error handler caching because it caused unexpected results145 for some exception inheritance hierarchies. Register handlers146 explicitly for each exception if you want to avoid traversing the168 MRO. (`#2362`_)169- Fix incorrect JSON encoding of aware, non-UTC datetimes. (`#2374`_)147 MRO. :pr:`2362`148- Fix incorrect JSON encoding of aware, non-UTC datetimes. :pr:`2374`149- Template auto reloading will honor debug mode even even if171 :attr:`~Flask.jinja_env` was already accessed. (`#2373`_)172- The following old deprecated code was removed. (`#2385`_)150 :attr:`~Flask.jinja_env` was already accessed. :pr:`2373`151- The following old deprecated code was removed. :issue:`2385`152153 - ``flask.ext`` - import extensions directly by their name instead154 of through the ``flask.ext`` namespace. For example,155 ``import flask.ext.sqlalchemy`` becomes
9 unmodified lines
165 instead.166 - ``Request.module`` - use :attr:`Request.blueprint` instead.167168- The :attr:`Request.json` property is no longer deprecated.190 (`#1421`_)191- Support passing a :class:`~werkzeug.test.EnvironBuilder` or192 ``dict`` to :meth:`test_client.open <werkzeug.test.Client.open>`.193 (`#2412`_)169 :issue:`1421`170- Support passing a :class:`~werkzeug.test.EnvironBuilder` or ``dict``171 to :meth:`test_client.open <werkzeug.test.Client.open>`. :pr:`2412`172- The ``flask`` command and :meth:`Flask.run` will load environment173 variables from ``.env`` and ``.flaskenv`` files if python-dotenv is196 installed. (`#2416`_)174 installed. :pr:`2416`175- When passing a full URL to the test client, the scheme in the URL is198 used instead of :data:`PREFERRED_URL_SCHEME`. (`#2430`_)176 used instead of :data:`PREFERRED_URL_SCHEME`. :pr:`2430`177- :attr:`Flask.logger` has been simplified. ``LOGGER_NAME`` and178 ``LOGGER_HANDLER_POLICY`` config was removed. The logger is always179 named ``flask.app``. The level is only set on first access, it180 doesn't check :attr:`Flask.debug` each time. Only one format is181 used, not different ones depending on :attr:`Flask.debug`. No182 handlers are removed, and a handler is only added if no handlers are205 already configured. (`#2436`_)206- Blueprint view function names may not contain dots. (`#2450`_)183 already configured. :pr:`2436`184- Blueprint view function names may not contain dots. :pr:`2450`185- Fix a ``ValueError`` caused by invalid ``Range`` requests in some208 cases. (`#2526`_)209- The development server uses threads by default. (`#2529`_)186 cases. :issue:`2526`187- The development server uses threads by default. :pr:`2529`188- Loading config files with ``silent=True`` will ignore211 :data:`~errno.ENOTDIR` errors. (`#2581`_)189 :data:`~errno.ENOTDIR` errors. :pr:`2581`190- Pass ``--cert`` and ``--key`` options to ``flask run`` to run the213 development server over HTTPS. (`#2606`_)191 development server over HTTPS. :pr:`2606`192- Added :data:`SESSION_COOKIE_SAMESITE` to control the ``SameSite``215 attribute on the session cookie. (`#2607`_)193 attribute on the session cookie. :pr:`2607`194- Added :meth:`~flask.Flask.test_cli_runner` to create a Click runner217 that can invoke Flask CLI commands for testing. (`#2636`_)195 that can invoke Flask CLI commands for testing. :pr:`2636`196- Subdomain matching is disabled by default and setting197 :data:`SERVER_NAME` does not implicily enable it. It can be enabled198 by passing ``subdomain_matching=True`` to the ``Flask`` constructor.221 (`#2635`_)199 :pr:`2635`200- A single trailing slash is stripped from the blueprint223 ``url_prefix`` when it is registered with the app. (`#2629`_)224- :meth:`Request.get_json` doesn't cache the225 result if parsing fails when ``silent`` is true. (`#2651`_)201 ``url_prefix`` when it is registered with the app. :pr:`2629`202- :meth:`Request.get_json` doesn't cache the result if parsing fails203 when ``silent`` is true. :issue:`2651`204- :func:`Request.get_json` no longer accepts arbitrary encodings.205 Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but228 Flask will autodetect UTF-8, -16, or -32. (`#2691`_)206 Flask will autodetect UTF-8, -16, or -32. :pr:`2691`207- Added :data:`MAX_COOKIE_SIZE` and :attr:`Response.max_cookie_size`208 to control when Werkzeug warns about large cookies that browsers may231 ignore. (`#2693`_)209 ignore. :pr:`2693`210- Updated documentation theme to make docs look better in small233 windows. (`#2709`_)211 windows. :pr:`2709`212- Rewrote the tutorial docs and example project to take a more213 structured approach to help new users avoid common pitfalls.236 (`#2676`_)214 :pr:`2676`215238.. _pallets/meta#24: https://github.com/pallets/meta/issues/24239.. _#1421: https://github.com/pallets/flask/issues/1421240.. _#1489: https://github.com/pallets/flask/pull/1489241.. _#1559: https://github.com/pallets/flask/issues/1559242.. _#1621: https://github.com/pallets/flask/pull/1621243.. _#1898: https://github.com/pallets/flask/pull/1898244.. _#1936: https://github.com/pallets/flask/pull/1936245.. _#2017: https://github.com/pallets/flask/pull/2017246.. _#2193: https://github.com/pallets/flask/pull/2193247.. _#2223: https://github.com/pallets/flask/pull/2223248.. _#2254: https://github.com/pallets/flask/pull/2254249.. _#2256: https://github.com/pallets/flask/pull/2256250.. _#2259: https://github.com/pallets/flask/pull/2259251.. _#2282: https://github.com/pallets/flask/pull/2282252.. _#2288: https://github.com/pallets/flask/pull/2288253.. _#2297: https://github.com/pallets/flask/pull/2297254.. _#2314: https://github.com/pallets/flask/pull/2314255.. _#2316: https://github.com/pallets/flask/pull/2316256.. _#2319: https://github.com/pallets/flask/pull/2319257.. _#2326: https://github.com/pallets/flask/pull/2326258.. _#2348: https://github.com/pallets/flask/pull/2348259.. _#2352: https://github.com/pallets/flask/pull/2352260.. _#2354: https://github.com/pallets/flask/pull/2354261.. _#2358: https://github.com/pallets/flask/pull/2358262.. _#2362: https://github.com/pallets/flask/pull/2362263.. _#2374: https://github.com/pallets/flask/pull/2374264.. _#2373: https://github.com/pallets/flask/pull/2373265.. _#2385: https://github.com/pallets/flask/issues/2385266.. _#2412: https://github.com/pallets/flask/pull/2412267.. _#2414: https://github.com/pallets/flask/pull/2414268.. _#2416: https://github.com/pallets/flask/pull/2416269.. _#2430: https://github.com/pallets/flask/pull/2430270.. _#2436: https://github.com/pallets/flask/pull/2436271.. _#2450: https://github.com/pallets/flask/pull/2450272.. _#2526: https://github.com/pallets/flask/issues/2526273.. _#2529: https://github.com/pallets/flask/pull/2529274.. _#2586: https://github.com/pallets/flask/issues/2586275.. _#2581: https://github.com/pallets/flask/pull/2581276.. _#2606: https://github.com/pallets/flask/pull/2606277.. _#2607: https://github.com/pallets/flask/pull/2607278.. _#2636: https://github.com/pallets/flask/pull/2636279.. _#2635: https://github.com/pallets/flask/pull/2635280.. _#2629: https://github.com/pallets/flask/pull/2629281.. _#2651: https://github.com/pallets/flask/issues/2651282.. _#2676: https://github.com/pallets/flask/pull/2676283.. _#2691: https://github.com/pallets/flask/pull/2691284.. _#2693: https://github.com/pallets/flask/pull/2693285.. _#2709: https://github.com/pallets/flask/pull/2709216287217Version 0.12.4218--------------219291Released on April 29 2018220Released 2018-04-29221293- Repackage 0.12.3 to fix package layout issue. (`#2728`_)222- Repackage 0.12.3 to fix package layout issue. :issue:`2728`223295.. _#2728: https://github.com/pallets/flask/issues/2728224297225Version 0.12.3226--------------227301Released on April 26th 2018228Released 2018-04-26229230- :func:`Request.get_json` no longer accepts arbitrary encodings.231 Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but305 Flask will autodetect UTF-8, -16, or -32. (`#2692`_)232 Flask will autodetect UTF-8, -16, or -32. :issue:`2692`233- Fix a Python warning about imports when using ``python -m flask``.307 (`#2666`_)234 :issue:`2666`235- Fix a ``ValueError`` caused by invalid ``Range`` requests in some236 cases.237311.. _#2666: https://github.com/pallets/flask/issues/2666312.. _#2692: https://github.com/pallets/flask/issues/2692238314239Version 0.12.2240--------------241318Released on May 16 2017242Released 2017-05-16243320- Fix a bug in `safe_join` on Windows.244- Fix a bug in ``safe_join`` on Windows.245246247Version 0.12.1248--------------249325Bugfix release, released on March 31st 2017250Released 2017-03-31251327- Prevent `flask run` from showing a NoAppException when an ImportError occurs328 within the imported application module.329- Fix encoding behavior of ``app.config.from_pyfile`` for Python 3. Fix330 ``#2118``.331- Use the ``SERVER_NAME`` config if it is present as default values for332 ``app.run``. ``#2109``, ``#2152``333- Call `ctx.auto_pop` with the exception object instead of `None`, in the334 event that a `BaseException` such as `KeyboardInterrupt` is raised in a335 request handler.252- Prevent ``flask run`` from showing a ``NoAppException`` when an253 ``ImportError`` occurs within the imported application module.254- Fix encoding behavior of ``app.config.from_pyfile`` for Python 3.255 :issue:`2118`256- Use the ``SERVER_NAME`` config if it is present as default values257 for ``app.run``. :issue:`2109`, :pr:`2152`258- Call ``ctx.auto_pop`` with the exception object instead of ``None``,259 in the event that a ``BaseException`` such as ``KeyboardInterrupt``260 is raised in a request handler.261262263Version 0.12264------------265340Released on December 21st 2016, codename Punsch.266Released 2016-12-21, codename Punsch267342- the cli command now responds to `--version`.343- Mimetype guessing and ETag generation for file-like objects in ``send_file``344 has been removed, as per issue ``#104``. See pull request ``#1849``.345- Mimetype guessing in ``send_file`` now fails loudly and doesn't fall back to346 ``application/octet-stream``. See pull request ``#1988``.347- Make ``flask.safe_join`` able to join multiple paths like ``os.path.join``348 (pull request ``#1730``).349- Revert a behavior change that made the dev server crash instead of returning350 a Internal Server Error (pull request ``#2006``).351- Correctly invoke response handlers for both regular request dispatching as352 well as error handlers.353- Disable logger propagation by default for the app logger.354- Add support for range requests in ``send_file``.355- ``app.test_client`` includes preset default environment, which can now be356 directly set, instead of per ``client.get``.268- The cli command now responds to ``--version``.269- Mimetype guessing and ETag generation for file-like objects in270 ``send_file`` has been removed. :issue:`104`, :pr`1849`271- Mimetype guessing in ``send_file`` now fails loudly and doesn't fall272 back to ``application/octet-stream``. :pr:`1988`273- Make ``flask.safe_join`` able to join multiple paths like274 ``os.path.join`` :pr:`1730`275- Revert a behavior change that made the dev server crash instead of276 returning an Internal Server Error. :pr:`2006`277- Correctly invoke response handlers for both regular request278 dispatching as well as error handlers.279- Disable logger propagation by default for the app logger.280- Add support for range requests in ``send_file``.281- ``app.test_client`` includes preset default environment, which can282 now be directly set, instead of per ``client.get``.283- Fix crash when running under PyPy3. :pr:`1814`284358Version 0.11.2359--------------285361Bugfix release, unreleased362363- Fix crash when running under PyPy3, see pull request ``#1814``.364286Version 0.11.1287--------------288368Bugfix release, released on June 7th 2016.289Released 2016-06-07290370- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from working. See371 pull request ``#1872``.291- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from292 working. :pr:`1872`293294295Version 0.11296------------297376Released on May 29th 2016, codename Absinthe.298Released 2016-05-29, codename Absinthe299378- Added support to serializing top-level arrays to :func:`flask.jsonify`. This379 introduces a security risk in ancient browsers. See380 :ref:`json-security` for details.381- Added before_render_template signal.382- Added `**kwargs` to :meth:`flask.Test.test_client` to support passing383 additional keyword arguments to the constructor of384 :attr:`flask.Flask.test_client_class`.385- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the386 set-cookie behavior. If set to ``True`` a permanent session will be387 refreshed each request and get their lifetime extended, if set to388 ``False`` it will only be modified if the session actually modifies.389 Non permanent sessions are not affected by this and will always390 expire if the browser window closes.391- Made Flask support custom JSON mimetypes for incoming data.392- Added support for returning tuples in the form ``(response, headers)``393 from a view function.394- Added :meth:`flask.Config.from_json`.395- Added :attr:`flask.Flask.config_class`.396- Added :meth:`flask.Config.get_namespace`.397- Templates are no longer automatically reloaded outside of debug mode. This398 can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config key.399- Added a workaround for a limitation in Python 3.3's namespace loader.400- Added support for explicit root paths when using Python 3.3's namespace401 packages.402- Added :command:`flask` and the ``flask.cli`` module to start the local403 debug server through the click CLI system. This is recommended over the old404 ``flask.run()`` method as it works faster and more reliable due to a405 different design and also replaces ``Flask-Script``.406- Error handlers that match specific classes are now checked first,407 thereby allowing catching exceptions that are subclasses of HTTP408 exceptions (in ``werkzeug.exceptions``). This makes it possible409 for an extension author to create exceptions that will by default410 result in the HTTP error of their choosing, but may be caught with411 a custom error handler if desired.412- Added :meth:`flask.Config.from_mapping`.413- Flask will now log by default even if debug is disabled. The log format is414 now hardcoded but the default log handling can be disabled through the415 ``LOGGER_HANDLER_POLICY`` configuration key.416- Removed deprecated module functionality.417- Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when enabled will418 instruct Flask to explain how it locates templates. This should help419 users debug when the wrong templates are loaded.420- Enforce blueprint handling in the order they were registered for template421 loading.422- Ported test suite to py.test.423- Deprecated ``request.json`` in favour of ``request.get_json()``.424- Add "pretty" and "compressed" separators definitions in jsonify() method.425 Reduces JSON response size when JSONIFY_PRETTYPRINT_REGULAR=False by removing426 unnecessary white space included by default after separators.427- JSON responses are now terminated with a newline character, because it is a428 convention that UNIX text files end with a newline and some clients don't429 deal well when this newline is missing. See430 https://github.com/pallets/flask/pull/1262 -- this came up originally as a431 part of https://github.com/kennethreitz/httpbin/issues/168432- The automatically provided ``OPTIONS`` method is now correctly disabled if433 the user registered an overriding rule with the lowercase-version434 ``options`` (issue ``#1288``).435- ``flask.json.jsonify`` now supports the ``datetime.date`` type (pull request436 ``#1326``).437- Don't leak exception info of already catched exceptions to context teardown438 handlers (pull request ``#1393``).439- Allow custom Jinja environment subclasses (pull request ``#1422``).440- Updated extension dev guidelines.300- Added support to serializing top-level arrays to301 :func:`flask.jsonify`. This introduces a security risk in ancient302 browsers. See :ref:`json-security` for details.303- Added before_render_template signal.304- Added ``**kwargs`` to :meth:`flask.Test.test_client` to support305 passing additional keyword arguments to the constructor of306 :attr:`flask.Flask.test_client_class`.307- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the308 set-cookie behavior. If set to ``True`` a permanent session will be309 refreshed each request and get their lifetime extended, if set to310 ``False`` it will only be modified if the session actually modifies.311 Non permanent sessions are not affected by this and will always312 expire if the browser window closes.313- Made Flask support custom JSON mimetypes for incoming data.314- Added support for returning tuples in the form ``(response,315 headers)`` from a view function.316- Added :meth:`flask.Config.from_json`.317- Added :attr:`flask.Flask.config_class`.318- Added :meth:`flask.Config.get_namespace`.319- Templates are no longer automatically reloaded outside of debug320 mode. This can be configured with the new ``TEMPLATES_AUTO_RELOAD``321 config key.322- Added a workaround for a limitation in Python 3.3's namespace323 loader.324- Added support for explicit root paths when using Python 3.3's325 namespace packages.326- Added :command:`flask` and the ``flask.cli`` module to start the327 local debug server through the click CLI system. This is recommended328 over the old ``flask.run()`` method as it works faster and more329 reliable due to a different design and also replaces330 ``Flask-Script``.331- Error handlers that match specific classes are now checked first,332 thereby allowing catching exceptions that are subclasses of HTTP333 exceptions (in ``werkzeug.exceptions``). This makes it possible for334 an extension author to create exceptions that will by default result335 in the HTTP error of their choosing, but may be caught with a custom336 error handler if desired.337- Added :meth:`flask.Config.from_mapping`.338- Flask will now log by default even if debug is disabled. The log339 format is now hardcoded but the default log handling can be disabled340 through the ``LOGGER_HANDLER_POLICY`` configuration key.341- Removed deprecated module functionality.342- Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when343 enabled will instruct Flask to explain how it locates templates.344 This should help users debug when the wrong templates are loaded.345- Enforce blueprint handling in the order they were registered for346 template loading.347- Ported test suite to py.test.348- Deprecated ``request.json`` in favour of ``request.get_json()``.349- Add "pretty" and "compressed" separators definitions in jsonify()350 method. Reduces JSON response size when351 ``JSONIFY_PRETTYPRINT_REGULAR=False`` by removing unnecessary white352 space included by default after separators.353- JSON responses are now terminated with a newline character, because354 it is a convention that UNIX text files end with a newline and some355 clients don't deal well when this newline is missing. This came up356 originally as a part of357 https://github.com/postmanlabs/httpbin/issues/168. :pr:`1262`358- The automatically provided ``OPTIONS`` method is now correctly359 disabled if the user registered an overriding rule with the360 lowercase-version ``options``. :issue:`1288`361- ``flask.json.jsonify`` now supports the ``datetime.date`` type.362 :pr:`1326`363- Don't leak exception info of already caught exceptions to context364 teardown handlers. :pr:`1393`365- Allow custom Jinja environment subclasses. :pr:`1422`366- Updated extension dev guidelines.367- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.368- Turn on autoescape for ``flask.templating.render_template_string``369 by default. :pr:`1515`370- ``flask.ext`` is now deprecated. :pr:`1484`371- ``send_from_directory`` now raises BadRequest if the filename is372 invalid on the server OS. :pr:`1763`373- Added the ``JSONIFY_MIMETYPE`` configuration variable. :pr:`1728`374- Exceptions during teardown handling will no longer leave bad375 application contexts lingering around.376- Fixed broken ``test_appcontext_signals()`` test case.377- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package`378 with a useful message explaining why it is raised when a PEP 302379 import hook is used without an ``is_package()`` method.380- Fixed an issue causing exceptions raised before entering a request381 or app context to be passed to teardown handlers.382- Fixed an issue with query parameters getting removed from requests383 in the test client when absolute URLs were requested.384- Made ``@before_first_request`` into a decorator as intended.385- Fixed an etags bug when sending a file streams with a name.386- Fixed ``send_from_directory`` not expanding to the application root387 path correctly.388- Changed logic of before first request handlers to flip the flag389 after invoking. This will allow some uses that are potentially390 dangerous but should probably be permitted.391- Fixed Python 3 bug when a handler from392 ``app.url_build_error_handlers`` reraises the ``BuildError``.393442- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.443- Turn on autoescape for ``flask.templating.render_template_string`` by default444 (pull request ``#1515``).445- ``flask.ext`` is now deprecated (pull request ``#1484``).446- ``send_from_directory`` now raises BadRequest if the filename is invalid on447 the server OS (pull request ``#1763``).448- Added the ``JSONIFY_MIMETYPE`` configuration variable (pull request ``#1728``).449- Exceptions during teardown handling will no longer leave bad application450 contexts lingering around.394452Version 0.10.2453--------------454455(bugfix release, release date to be announced)456457- Fixed broken `test_appcontext_signals()` test case.458- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package` with a459 useful message explaining why it is raised when a PEP 302 import hook is used460 without an `is_package()` method.461- Fixed an issue causing exceptions raised before entering a request or app462 context to be passed to teardown handlers.463- Fixed an issue with query parameters getting removed from requests in464 the test client when absolute URLs were requested.465- Made `@before_first_request` into a decorator as intended.466- Fixed an etags bug when sending a file streams with a name.467- Fixed `send_from_directory` not expanding to the application root path468 correctly.469- Changed logic of before first request handlers to flip the flag after470 invoking. This will allow some uses that are potentially dangerous but471 should probably be permitted.472- Fixed Python 3 bug when a handler from `app.url_build_error_handlers`473 reraises the `BuildError`.474395Version 0.10.1396--------------397478(bugfix release, released on June 14th 2013)398Released 2013-06-14399480- Fixed an issue where ``|tojson`` was not quoting single quotes which481 made the filter not work properly in HTML attributes. Now it's482 possible to use that filter in single quoted attributes. This should483 make using that filter with angular.js easier.484- Added support for byte strings back to the session system. This broke485 compatibility with the common case of people putting binary data for486 token verification into the session.487- Fixed an issue where registering the same method twice for the same endpoint488 would trigger an exception incorrectly.400- Fixed an issue where ``|tojson`` was not quoting single quotes which401 made the filter not work properly in HTML attributes. Now it's402 possible to use that filter in single quoted attributes. This should403 make using that filter with angular.js easier.404- Added support for byte strings back to the session system. This405 broke compatibility with the common case of people putting binary406 data for token verification into the session.407- Fixed an issue where registering the same method twice for the same408 endpoint would trigger an exception incorrectly.409410411Version 0.10412------------413493Released on June 13th 2013, codename Limoncello.414Released 2013-06-13, codename Limoncello415495- Changed default cookie serialization format from pickle to JSON to496 limit the impact an attacker can do if the secret key leaks. See497 :ref:`upgrading-to-010` for more information.498- Added ``template_test`` methods in addition to the already existing499 ``template_filter`` method family.500- Added ``template_global`` methods in addition to the already existing501 ``template_filter`` method family.502- Set the content-length header for x-sendfile.503- ``tojson`` filter now does not escape script blocks in HTML5 parsers.504- ``tojson`` used in templates is now safe by default due. This was505 allowed due to the different escaping behavior.506- Flask will now raise an error if you attempt to register a new function507 on an already used endpoint.508- Added wrapper module around simplejson and added default serialization509 of datetime objects. This allows much easier customization of how510 JSON is handled by Flask or any Flask extension.511- Removed deprecated internal ``flask.session`` module alias. Use512 ``flask.sessions`` instead to get the session module. This is not to513 be confused with ``flask.session`` the session proxy.514- Templates can now be rendered without request context. The behavior is515 slightly different as the ``request``, ``session`` and ``g`` objects516 will not be available and blueprint's context processors are not517 called.518- The config object is now available to the template as a real global and519 not through a context processor which makes it available even in imported520 templates by default.521- Added an option to generate non-ascii encoded JSON which should result522 in less bytes being transmitted over the network. It's disabled by523 default to not cause confusion with existing libraries that might expect524 ``flask.json.dumps`` to return bytestrings by default.525- ``flask.g`` is now stored on the app context instead of the request526 context.527- ``flask.g`` now gained a ``get()`` method for not erroring out on non528 existing items.529- ``flask.g`` now can be used with the ``in`` operator to see what's defined530 and it now is iterable and will yield all attributes stored.531- ``flask.Flask.request_globals_class`` got renamed to532 ``flask.Flask.app_ctx_globals_class`` which is a better name to what it533 does since 0.10.534- `request`, `session` and `g` are now also added as proxies to the template535 context which makes them available in imported templates. One has to be536 very careful with those though because usage outside of macros might537 cause caching.538- Flask will no longer invoke the wrong error handlers if a proxy539 exception is passed through.540- Added a workaround for chrome's cookies in localhost not working541 as intended with domain names.542- Changed logic for picking defaults for cookie values from sessions543 to work better with Google Chrome.544- Added `message_flashed` signal that simplifies flashing testing.545- Added support for copying of request contexts for better working with546 greenlets.547- Removed custom JSON HTTP exception subclasses. If you were relying on them548 you can reintroduce them again yourself trivially. Using them however is549 strongly discouraged as the interface was flawed.550- Python requirements changed: requiring Python 2.6 or 2.7 now to prepare551 for Python 3.3 port.552- Changed how the teardown system is informed about exceptions. This is now553 more reliable in case something handles an exception halfway through554 the error handling process.555- Request context preservation in debug mode now keeps the exception556 information around which means that teardown handlers are able to557 distinguish error from success cases.558- Added the ``JSONIFY_PRETTYPRINT_REGULAR`` configuration variable.559- Flask now orders JSON keys by default to not trash HTTP caches due to560 different hash seeds between different workers.561- Added `appcontext_pushed` and `appcontext_popped` signals.562- The builtin run method now takes the ``SERVER_NAME`` into account when563 picking the default port to run on.564- Added `flask.request.get_json()` as a replacement for the old565 `flask.request.json` property.416- Changed default cookie serialization format from pickle to JSON to417 limit the impact an attacker can do if the secret key leaks. See418 :ref:`upgrading-to-010` for more information.419- Added ``template_test`` methods in addition to the already existing420 ``template_filter`` method family.421- Added ``template_global`` methods in addition to the already422 existing ``template_filter`` method family.423- Set the content-length header for x-sendfile.424- ``tojson`` filter now does not escape script blocks in HTML5425 parsers.426- ``tojson`` used in templates is now safe by default due. This was427 allowed due to the different escaping behavior.428- Flask will now raise an error if you attempt to register a new429 function on an already used endpoint.430- Added wrapper module around simplejson and added default431 serialization of datetime objects. This allows much easier432 customization of how JSON is handled by Flask or any Flask433 extension.434- Removed deprecated internal ``flask.session`` module alias. Use435 ``flask.sessions`` instead to get the session module. This is not to436 be confused with ``flask.session`` the session proxy.437- Templates can now be rendered without request context. The behavior438 is slightly different as the ``request``, ``session`` and ``g``439 objects will not be available and blueprint's context processors are440 not called.441- The config object is now available to the template as a real global442 and not through a context processor which makes it available even in443 imported templates by default.444- Added an option to generate non-ascii encoded JSON which should445 result in less bytes being transmitted over the network. It's446 disabled by default to not cause confusion with existing libraries447 that might expect ``flask.json.dumps`` to return bytestrings by448 default.449- ``flask.g`` is now stored on the app context instead of the request450 context.451- ``flask.g`` now gained a ``get()`` method for not erroring out on452 non existing items.453- ``flask.g`` now can be used with the ``in`` operator to see what's454 defined and it now is iterable and will yield all attributes stored.455- ``flask.Flask.request_globals_class`` got renamed to456 ``flask.Flask.app_ctx_globals_class`` which is a better name to what457 it does since 0.10.458- ``request``, ``session`` and ``g`` are now also added as proxies to459 the template context which makes them available in imported460 templates. One has to be very careful with those though because461 usage outside of macros might cause caching.462- Flask will no longer invoke the wrong error handlers if a proxy463 exception is passed through.464- Added a workaround for chrome's cookies in localhost not working as465 intended with domain names.466- Changed logic for picking defaults for cookie values from sessions467 to work better with Google Chrome.468- Added ``message_flashed`` signal that simplifies flashing testing.469- Added support for copying of request contexts for better working470 with greenlets.471- Removed custom JSON HTTP exception subclasses. If you were relying472 on them you can reintroduce them again yourself trivially. Using473 them however is strongly discouraged as the interface was flawed.474- Python requirements changed: requiring Python 2.6 or 2.7 now to475 prepare for Python 3.3 port.476- Changed how the teardown system is informed about exceptions. This477 is now more reliable in case something handles an exception halfway478 through the error handling process.479- Request context preservation in debug mode now keeps the exception480 information around which means that teardown handlers are able to481 distinguish error from success cases.482- Added the ``JSONIFY_PRETTYPRINT_REGULAR`` configuration variable.483- Flask now orders JSON keys by default to not trash HTTP caches due484 to different hash seeds between different workers.485- Added ``appcontext_pushed`` and ``appcontext_popped`` signals.486- The builtin run method now takes the ``SERVER_NAME`` into account487 when picking the default port to run on.488- Added ``flask.request.get_json()`` as a replacement for the old489 ``flask.request.json`` property.490491492Version 0.9493-----------494570Released on July 1st 2012, codename Campari.495Released 2012-07-01, codename Campari496572- The :func:`flask.Request.on_json_loading_failed` now returns a JSON formatted573 response by default.574- The :func:`flask.url_for` function now can generate anchors to the575 generated links.576- The :func:`flask.url_for` function now can also explicitly generate577 URL rules specific to a given HTTP method.578- Logger now only returns the debug log setting if it was not set579 explicitly.580- Unregister a circular dependency between the WSGI environment and581 the request object when shutting down the request. This means that582 environ ``werkzeug.request`` will be ``None`` after the response was583 returned to the WSGI server but has the advantage that the garbage584 collector is not needed on CPython to tear down the request unless585 the user created circular dependencies themselves.586- Session is now stored after callbacks so that if the session payload587 is stored in the session you can still modify it in an after588 request callback.589- The :class:`flask.Flask` class will avoid importing the provided import name590 if it can (the required first parameter), to benefit tools which build Flask591 instances programmatically. The Flask class will fall back to using import592 on systems with custom module hooks, e.g. Google App Engine, or when the593 import name is inside a zip archive (usually a .egg) prior to Python 2.7.594- Blueprints now have a decorator to add custom template filters application595 wide, :meth:`flask.Blueprint.app_template_filter`.596- The Flask and Blueprint classes now have a non-decorator method for adding597 custom template filters application wide,598 :meth:`flask.Flask.add_template_filter` and599 :meth:`flask.Blueprint.add_app_template_filter`.600- The :func:`flask.get_flashed_messages` function now allows rendering flashed601 message categories in separate blocks, through a ``category_filter``602 argument.603- The :meth:`flask.Flask.run` method now accepts ``None`` for `host` and `port`604 arguments, using default values when ``None``. This allows for calling run605 using configuration values, e.g. ``app.run(app.config.get('MYHOST'),606 app.config.get('MYPORT'))``, with proper behavior whether or not a config607 file is provided.608- The :meth:`flask.render_template` method now accepts a either an iterable of609 template names or a single template name. Previously, it only accepted a610 single template name. On an iterable, the first template found is rendered.611- Added :meth:`flask.Flask.app_context` which works very similar to the612 request context but only provides access to the current application. This613 also adds support for URL generation without an active request context.614- View functions can now return a tuple with the first instance being an615 instance of :class:`flask.Response`. This allows for returning616 ``jsonify(error="error msg"), 400`` from a view function.617- :class:`~flask.Flask` and :class:`~flask.Blueprint` now provide a618 :meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to override619 behavior of serving static files from Flask when using620 :meth:`flask.Flask.send_static_file` (used for the default static file621 handler) and :func:`~flask.helpers.send_file`. This hook is provided a622 filename, which for example allows changing cache controls by file extension.623 The default max-age for `send_file` and static files can be configured624 through a new ``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, which is625 used in the default `get_send_file_max_age` implementation.626- Fixed an assumption in sessions implementation which could break message627 flashing on sessions implementations which use external storage.628- Changed the behavior of tuple return values from functions. They are no629 longer arguments to the response object, they now have a defined meaning.630- Added :attr:`flask.Flask.request_globals_class` to allow a specific class to631 be used on creation of the :data:`~flask.g` instance of each request.632- Added `required_methods` attribute to view functions to force-add methods633 on registration.634- Added :func:`flask.after_this_request`.635- Added :func:`flask.stream_with_context` and the ability to push contexts636 multiple times without producing unexpected behavior.497- The :func:`flask.Request.on_json_loading_failed` now returns a JSON498 formatted response by default.499- The :func:`flask.url_for` function now can generate anchors to the500 generated links.501- The :func:`flask.url_for` function now can also explicitly generate502 URL rules specific to a given HTTP method.503- Logger now only returns the debug log setting if it was not set504 explicitly.505- Unregister a circular dependency between the WSGI environment and506 the request object when shutting down the request. This means that507 environ ``werkzeug.request`` will be ``None`` after the response was508 returned to the WSGI server but has the advantage that the garbage509 collector is not needed on CPython to tear down the request unless510 the user created circular dependencies themselves.511- Session is now stored after callbacks so that if the session payload512 is stored in the session you can still modify it in an after request513 callback.514- The :class:`flask.Flask` class will avoid importing the provided515 import name if it can (the required first parameter), to benefit516 tools which build Flask instances programmatically. The Flask class517 will fall back to using import on systems with custom module hooks,518 e.g. Google App Engine, or when the import name is inside a zip519 archive (usually a .egg) prior to Python 2.7.520- Blueprints now have a decorator to add custom template filters521 application wide, :meth:`flask.Blueprint.app_template_filter`.522- The Flask and Blueprint classes now have a non-decorator method for523 adding custom template filters application wide,524 :meth:`flask.Flask.add_template_filter` and525 :meth:`flask.Blueprint.add_app_template_filter`.526- The :func:`flask.get_flashed_messages` function now allows rendering527 flashed message categories in separate blocks, through a528 ``category_filter`` argument.529- The :meth:`flask.Flask.run` method now accepts ``None`` for ``host``530 and ``port`` arguments, using default values when ``None``. This531 allows for calling run using configuration values, e.g.532 ``app.run(app.config.get('MYHOST'), app.config.get('MYPORT'))``,533 with proper behavior whether or not a config file is provided.534- The :meth:`flask.render_template` method now accepts a either an535 iterable of template names or a single template name. Previously, it536 only accepted a single template name. On an iterable, the first537 template found is rendered.538- Added :meth:`flask.Flask.app_context` which works very similar to539 the request context but only provides access to the current540 application. This also adds support for URL generation without an541 active request context.542- View functions can now return a tuple with the first instance being543 an instance of :class:`flask.Response`. This allows for returning544 ``jsonify(error="error msg"), 400`` from a view function.545- :class:`~flask.Flask` and :class:`~flask.Blueprint` now provide a546 :meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to547 override behavior of serving static files from Flask when using548 :meth:`flask.Flask.send_static_file` (used for the default static549 file handler) and :func:`~flask.helpers.send_file`. This hook is550 provided a filename, which for example allows changing cache551 controls by file extension. The default max-age for ``send_file``552 and static files can be configured through a new553 ``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, which is used554 in the default ``get_send_file_max_age`` implementation.555- Fixed an assumption in sessions implementation which could break556 message flashing on sessions implementations which use external557 storage.558- Changed the behavior of tuple return values from functions. They are559 no longer arguments to the response object, they now have a defined560 meaning.561- Added :attr:`flask.Flask.request_globals_class` to allow a specific562 class to be used on creation of the :data:`~flask.g` instance of563 each request.564- Added ``required_methods`` attribute to view functions to force-add565 methods on registration.566- Added :func:`flask.after_this_request`.567- Added :func:`flask.stream_with_context` and the ability to push568 contexts multiple times without producing unexpected behavior.569570571Version 0.8.1572-------------573641Bugfix release, released on July 1st 2012574Released 2012-07-01575643- Fixed an issue with the undocumented `flask.session` module to not644 work properly on Python 2.5. It should not be used but did cause645 some problems for package managers.576- Fixed an issue with the undocumented ``flask.session`` module to not577 work properly on Python 2.5. It should not be used but did cause578 some problems for package managers.579580581Version 0.8582-----------583650Released on September 29th 2011, codename Rakija584Released 2011-09-29, codename Rakija585652- Refactored session support into a session interface so that653 the implementation of the sessions can be changed without654 having to override the Flask class.655- Empty session cookies are now deleted properly automatically.656- View functions can now opt out of getting the automatic657 OPTIONS implementation.658- HTTP exceptions and Bad Request errors can now be trapped so that they659 show up normally in the traceback.660- Flask in debug mode is now detecting some common problems and tries to661 warn you about them.662- Flask in debug mode will now complain with an assertion error if a view663 was attached after the first request was handled. This gives earlier664 feedback when users forget to import view code ahead of time.665- Added the ability to register callbacks that are only triggered once at666 the beginning of the first request. (:meth:`Flask.before_first_request`)667- Malformed JSON data will now trigger a bad request HTTP exception instead668 of a value error which usually would result in a 500 internal server669 error if not handled. This is a backwards incompatible change.670- Applications now not only have a root path where the resources and modules671 are located but also an instance path which is the designated place to672 drop files that are modified at runtime (uploads etc.). Also this is673 conceptually only instance depending and outside version control so it's674 the perfect place to put configuration files etc. For more information675 see :ref:`instance-folders`.676- Added the ``APPLICATION_ROOT`` configuration variable.677- Implemented :meth:`~flask.testing.TestClient.session_transaction` to678 easily modify sessions from the test environment.679- Refactored test client internally. The ``APPLICATION_ROOT`` configuration680 variable as well as ``SERVER_NAME`` are now properly used by the test client681 as defaults.682- Added :attr:`flask.views.View.decorators` to support simpler decorating of683 pluggable (class-based) views.684- Fixed an issue where the test client if used with the "with" statement did not685 trigger the execution of the teardown handlers.686- Added finer control over the session cookie parameters.687- HEAD requests to a method view now automatically dispatch to the `get`688 method if no handler was implemented.689- Implemented the virtual :mod:`flask.ext` package to import extensions from.690- The context preservation on exceptions is now an integral component of691 Flask itself and no longer of the test client. This cleaned up some692 internal logic and lowers the odds of runaway request contexts in unittests.586- Refactored session support into a session interface so that the587 implementation of the sessions can be changed without having to588 override the Flask class.589- Empty session cookies are now deleted properly automatically.590- View functions can now opt out of getting the automatic OPTIONS591 implementation.592- HTTP exceptions and Bad Request errors can now be trapped so that593 they show up normally in the traceback.594- Flask in debug mode is now detecting some common problems and tries595 to warn you about them.596- Flask in debug mode will now complain with an assertion error if a597 view was attached after the first request was handled. This gives598 earlier feedback when users forget to import view code ahead of599 time.600- Added the ability to register callbacks that are only triggered once601 at the beginning of the first request.602 (:meth:`Flask.before_first_request`)603- Malformed JSON data will now trigger a bad request HTTP exception604 instead of a value error which usually would result in a 500605 internal server error if not handled. This is a backwards606 incompatible change.607- Applications now not only have a root path where the resources and608 modules are located but also an instance path which is the609 designated place to drop files that are modified at runtime (uploads610 etc.). Also this is conceptually only instance depending and outside611 version control so it's the perfect place to put configuration files612 etc. For more information see :ref:`instance-folders`.613- Added the ``APPLICATION_ROOT`` configuration variable.614- Implemented :meth:`~flask.testing.TestClient.session_transaction` to615 easily modify sessions from the test environment.616- Refactored test client internally. The ``APPLICATION_ROOT``617 configuration variable as well as ``SERVER_NAME`` are now properly618 used by the test client as defaults.619- Added :attr:`flask.views.View.decorators` to support simpler620 decorating of pluggable (class-based) views.621- Fixed an issue where the test client if used with the "with"622 statement did not trigger the execution of the teardown handlers.623- Added finer control over the session cookie parameters.624- HEAD requests to a method view now automatically dispatch to the625 ``get`` method if no handler was implemented.626- Implemented the virtual :mod:`flask.ext` package to import627 extensions from.628- The context preservation on exceptions is now an integral component629 of Flask itself and no longer of the test client. This cleaned up630 some internal logic and lowers the odds of runaway request contexts631 in unittests.632- Fixed the Jinja2 environment's ``list_templates`` method not633 returning the correct names when blueprints or modules were634 involved.635694Version 0.7.3695-------------636697Bugfix release, release date to be decided698699- Fixed the Jinja2 environment's list_templates method not returning the700 correct names when blueprints or modules were involved.701637Version 0.7.2638-------------639705Bugfix release, released on July 6th 2011640Released 2011-07-06641707- Fixed an issue with URL processors not properly working on708 blueprints.642- Fixed an issue with URL processors not properly working on643 blueprints.644645646Version 0.7.1647-------------648713Bugfix release, released on June 29th 2011649Released 2011-06-29650715- Added missing future import that broke 2.5 compatibility.716- Fixed an infinite redirect issue with blueprints.651- Added missing future import that broke 2.5 compatibility.652- Fixed an infinite redirect issue with blueprints.653654655Version 0.7656-----------657721Released on June 28th 2011, codename Grappa658Released 2011-06-28, codename Grappa659723- Added :meth:`~flask.Flask.make_default_options_response`724 which can be used by subclasses to alter the default725 behavior for ``OPTIONS`` responses.726- Unbound locals now raise a proper :exc:`RuntimeError` instead727 of an :exc:`AttributeError`.728- Mimetype guessing and etag support based on file objects is now729 deprecated for :func:`flask.send_file` because it was unreliable.730 Pass filenames instead or attach your own etags and provide a731 proper mimetype by hand.732- Static file handling for modules now requires the name of the733 static folder to be supplied explicitly. The previous autodetection734 was not reliable and caused issues on Google's App Engine. Until735 1.0 the old behavior will continue to work but issue dependency736 warnings.737- fixed a problem for Flask to run on jython.738- added a ``PROPAGATE_EXCEPTIONS`` configuration variable that can be739 used to flip the setting of exception propagation which previously740 was linked to ``DEBUG`` alone and is now linked to either ``DEBUG`` or741 ``TESTING``.742- Flask no longer internally depends on rules being added through the743 `add_url_rule` function and can now also accept regular werkzeug744 rules added to the url map.745- Added an `endpoint` method to the flask application object which746 allows one to register a callback to an arbitrary endpoint with747 a decorator.748- Use Last-Modified for static file sending instead of Date which749 was incorrectly introduced in 0.6.750- Added `create_jinja_loader` to override the loader creation process.751- Implemented a silent flag for `config.from_pyfile`.752- Added `teardown_request` decorator, for functions that should run at the end753 of a request regardless of whether an exception occurred. Also the behavior754 for `after_request` was changed. It's now no longer executed when an exception755 is raised. See :ref:`upgrading-to-new-teardown-handling`756- Implemented :func:`flask.has_request_context`757- Deprecated `init_jinja_globals`. Override the758 :meth:`~flask.Flask.create_jinja_environment` method instead to759 achieve the same functionality.760- Added :func:`flask.safe_join`761- The automatic JSON request data unpacking now looks at the charset762 mimetype parameter.763- Don't modify the session on :func:`flask.get_flashed_messages` if there764 are no messages in the session.765- `before_request` handlers are now able to abort requests with errors.766- it is not possible to define user exception handlers. That way you can767 provide custom error messages from a central hub for certain errors that768 might occur during request processing (for instance database connection769 errors, timeouts from remote resources etc.).770- Blueprints can provide blueprint specific error handlers.771- Implemented generic :ref:`views` (class-based views).660- Added :meth:`~flask.Flask.make_default_options_response` which can661 be used by subclasses to alter the default behavior for ``OPTIONS``662 responses.663- Unbound locals now raise a proper :exc:`RuntimeError` instead of an664 :exc:`AttributeError`.665- Mimetype guessing and etag support based on file objects is now666 deprecated for :func:`flask.send_file` because it was unreliable.667 Pass filenames instead or attach your own etags and provide a proper668 mimetype by hand.669- Static file handling for modules now requires the name of the static670 folder to be supplied explicitly. The previous autodetection was not671 reliable and caused issues on Google's App Engine. Until 1.0 the old672 behavior will continue to work but issue dependency warnings.673- Fixed a problem for Flask to run on jython.674- Added a ``PROPAGATE_EXCEPTIONS`` configuration variable that can be675 used to flip the setting of exception propagation which previously676 was linked to ``DEBUG`` alone and is now linked to either ``DEBUG``677 or ``TESTING``.678- Flask no longer internally depends on rules being added through the679 ``add_url_rule`` function and can now also accept regular werkzeug680 rules added to the url map.681- Added an ``endpoint`` method to the flask application object which682 allows one to register a callback to an arbitrary endpoint with a683 decorator.684- Use Last-Modified for static file sending instead of Date which was685 incorrectly introduced in 0.6.686- Added ``create_jinja_loader`` to override the loader creation687 process.688- Implemented a silent flag for ``config.from_pyfile``.689- Added ``teardown_request`` decorator, for functions that should run690 at the end of a request regardless of whether an exception occurred.691 Also the behavior for ``after_request`` was changed. It's now no692 longer executed when an exception is raised. See693 :ref:`upgrading-to-new-teardown-handling`694- Implemented :func:`flask.has_request_context`695- Deprecated ``init_jinja_globals``. Override the696 :meth:`~flask.Flask.create_jinja_environment` method instead to697 achieve the same functionality.698- Added :func:`flask.safe_join`699- The automatic JSON request data unpacking now looks at the charset700 mimetype parameter.701- Don't modify the session on :func:`flask.get_flashed_messages` if702 there are no messages in the session.703- ``before_request`` handlers are now able to abort requests with704 errors.705- It is not possible to define user exception handlers. That way you706 can provide custom error messages from a central hub for certain707 errors that might occur during request processing (for instance708 database connection errors, timeouts from remote resources etc.).709- Blueprints can provide blueprint specific error handlers.710- Implemented generic :ref:`views` (class-based views).711712713Version 0.6.1714-------------715776Bugfix release, released on December 31st 2010716Released 2010-12-31717778- Fixed an issue where the default ``OPTIONS`` response was779 not exposing all valid methods in the ``Allow`` header.780- Jinja2 template loading syntax now allows "./" in front of781 a template load path. Previously this caused issues with782 module setups.783- Fixed an issue where the subdomain setting for modules was784 ignored for the static folder.785- Fixed a security problem that allowed clients to download arbitrary files786 if the host server was a windows based operating system and the client787 uses backslashes to escape the directory the files where exposed from.718- Fixed an issue where the default ``OPTIONS`` response was not719 exposing all valid methods in the ``Allow`` header.720- Jinja2 template loading syntax now allows "./" in front of a721 template load path. Previously this caused issues with module722 setups.723- Fixed an issue where the subdomain setting for modules was ignored724 for the static folder.725- Fixed a security problem that allowed clients to download arbitrary726 files if the host server was a windows based operating system and727 the client uses backslashes to escape the directory the files where728 exposed from.729730731Version 0.6732-----------733792Released on July 27th 2010, codename Whisky734Released 2010-07-27, codename Whisky735794- after request functions are now called in reverse order of795 registration.796- OPTIONS is now automatically implemented by Flask unless the797 application explicitly adds 'OPTIONS' as method to the URL rule.798 In this case no automatic OPTIONS handling kicks in.799- static rules are now even in place if there is no static folder800 for the module. This was implemented to aid GAE which will801 remove the static folder if it's part of a mapping in the .yml802 file.803- the :attr:`~flask.Flask.config` is now available in the templates804 as `config`.805- context processors will no longer override values passed directly806 to the render function.807- added the ability to limit the incoming request data with the808 new ``MAX_CONTENT_LENGTH`` configuration value.809- the endpoint for the :meth:`flask.Module.add_url_rule` method810 is now optional to be consistent with the function of the811 same name on the application object.812- added a :func:`flask.make_response` function that simplifies813 creating response object instances in views.814- added signalling support based on blinker. This feature is currently815 optional and supposed to be used by extensions and applications. If816 you want to use it, make sure to have `blinker`_ installed.817- refactored the way URL adapters are created. This process is now818 fully customizable with the :meth:`~flask.Flask.create_url_adapter`819 method.820- modules can now register for a subdomain instead of just an URL821 prefix. This makes it possible to bind a whole module to a822 configurable subdomain.736- After request functions are now called in reverse order of737 registration.738- OPTIONS is now automatically implemented by Flask unless the739 application explicitly adds 'OPTIONS' as method to the URL rule. In740 this case no automatic OPTIONS handling kicks in.741- Static rules are now even in place if there is no static folder for742 the module. This was implemented to aid GAE which will remove the743 static folder if it's part of a mapping in the .yml file.744- The :attr:`~flask.Flask.config` is now available in the templates as745 ``config``.746- Context processors will no longer override values passed directly to747 the render function.748- Added the ability to limit the incoming request data with the new749 ``MAX_CONTENT_LENGTH`` configuration value.750- The endpoint for the :meth:`flask.Module.add_url_rule` method is now751 optional to be consistent with the function of the same name on the752 application object.753- Added a :func:`flask.make_response` function that simplifies754 creating response object instances in views.755- Added signalling support based on blinker. This feature is currently756 optional and supposed to be used by extensions and applications. If757 you want to use it, make sure to have `blinker`_ installed.758- Refactored the way URL adapters are created. This process is now759 fully customizable with the :meth:`~flask.Flask.create_url_adapter`760 method.761- Modules can now register for a subdomain instead of just an URL762 prefix. This makes it possible to bind a whole module to a763 configurable subdomain.764765.. _blinker: https://pypi.org/project/blinker/766767768Version 0.5.2769-------------770829Bugfix Release, released on July 15th 2010771Released 2010-07-15772831- fixed another issue with loading templates from directories when832 modules were used.773- Fixed another issue with loading templates from directories when774 modules were used.775776777Version 0.5.1778-------------779837Bugfix Release, released on July 6th 2010780Released 2010-07-06781839- fixes an issue with template loading from directories when modules840 where used.782- Fixes an issue with template loading from directories when modules783 where used.784785786Version 0.5787-----------788845Released on July 6th 2010, codename Calvados789Released 2010-07-06, codename Calvados790847- fixed a bug with subdomains that was caused by the inability to848 specify the server name. The server name can now be set with849 the ``SERVER_NAME`` config key. This key is now also used to set850 the session cookie cross-subdomain wide.851- autoescaping is no longer active for all templates. Instead it852 is only active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``.853 Inside templates this behavior can be changed with the854 ``autoescape`` tag.855- refactored Flask internally. It now consists of more than a856 single file.857- :func:`flask.send_file` now emits etags and has the ability to858 do conditional responses builtin.859- (temporarily) dropped support for zipped applications. This was a860 rarely used feature and led to some confusing behavior.861- added support for per-package template and static-file directories.862- removed support for `create_jinja_loader` which is no longer used863 in 0.5 due to the improved module support.864- added a helper function to expose files from any directory.791- Fixed a bug with subdomains that was caused by the inability to792 specify the server name. The server name can now be set with the793 ``SERVER_NAME`` config key. This key is now also used to set the794 session cookie cross-subdomain wide.795- Autoescaping is no longer active for all templates. Instead it is796 only active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``. Inside797 templates this behavior can be changed with the ``autoescape`` tag.798- Refactored Flask internally. It now consists of more than a single799 file.800- :func:`flask.send_file` now emits etags and has the ability to do801 conditional responses builtin.802- (temporarily) dropped support for zipped applications. This was a803 rarely used feature and led to some confusing behavior.804- Added support for per-package template and static-file directories.805- Removed support for ``create_jinja_loader`` which is no longer used806 in 0.5 due to the improved module support.807- Added a helper function to expose files from any directory.808809810Version 0.4811-----------812869Released on June 18th 2010, codename Rakia813Released 2010-06-18, codename Rakia814871- added the ability to register application wide error handlers872 from modules.873- :meth:`~flask.Flask.after_request` handlers are now also invoked874 if the request dies with an exception and an error handling page875 kicks in.876- test client has not the ability to preserve the request context877 for a little longer. This can also be used to trigger custom878 requests that do not pop the request stack for testing.879- because the Python standard library caches loggers, the name of880 the logger is configurable now to better support unittests.881- added ``TESTING`` switch that can activate unittesting helpers.882- the logger switches to ``DEBUG`` mode now if debug is enabled.815- Added the ability to register application wide error handlers from816 modules.817- :meth:`~flask.Flask.after_request` handlers are now also invoked if818 the request dies with an exception and an error handling page kicks819 in.820- Test client has not the ability to preserve the request context for821 a little longer. This can also be used to trigger custom requests822 that do not pop the request stack for testing.823- Because the Python standard library caches loggers, the name of the824 logger is configurable now to better support unittests.825- Added ``TESTING`` switch that can activate unittesting helpers.826- The logger switches to ``DEBUG`` mode now if debug is enabled.827828829Version 0.3.1830-------------831887Bugfix release, released on May 28th 2010832Released 2010-05-28833889- fixed a error reporting bug with :meth:`flask.Config.from_envvar`890- removed some unused code from flask891- release does no longer include development leftover files (.git892 folder for themes, built documentation in zip and pdf file and893 some .pyc files)834- Fixed a error reporting bug with :meth:`flask.Config.from_envvar`835- Removed some unused code from flask836- Release does no longer include development leftover files (.git837 folder for themes, built documentation in zip and pdf file and some838 .pyc files)839840841Version 0.3842-----------843898Released on May 28th 2010, codename Schnaps844Released 2010-05-28, codename Schnaps845900- added support for categories for flashed messages.901- the application now configures a :class:`logging.Handler` and will902 log request handling exceptions to that logger when not in debug903 mode. This makes it possible to receive mails on server errors904 for example.905- added support for context binding that does not require the use of906 the with statement for playing in the console.907- the request context is now available within the with statement making908 it possible to further push the request context or pop it.909- added support for configurations.846- Added support for categories for flashed messages.847- The application now configures a :class:`logging.Handler` and will848 log request handling exceptions to that logger when not in debug849 mode. This makes it possible to receive mails on server errors for850 example.851- Added support for context binding that does not require the use of852 the with statement for playing in the console.853- The request context is now available within the with statement854 making it possible to further push the request context or pop it.855- Added support for configurations.856857858Version 0.2859-----------860914Released on May 12th 2010, codename Jägermeister861Released 2010-05-12, codename Jägermeister862916- various bugfixes917- integrated JSON support918- added :func:`~flask.get_template_attribute` helper function.919- :meth:`~flask.Flask.add_url_rule` can now also register a920 view function.921- refactored internal request dispatching.922- server listens on 127.0.0.1 by default now to fix issues with chrome.923- added external URL support.924- added support for :func:`~flask.send_file`925- module support and internal request handling refactoring926 to better support pluggable applications.927- sessions can be set to be permanent now on a per-session basis.928- better error reporting on missing secret keys.929- added support for Google Appengine.863- Various bugfixes864- Integrated JSON support865- Added :func:`~flask.get_template_attribute` helper function.866- :meth:`~flask.Flask.add_url_rule` can now also register a view867 function.868- Refactored internal request dispatching.869- Server listens on 127.0.0.1 by default now to fix issues with870 chrome.871- Added external URL support.872- Added support for :func:`~flask.send_file`873- Module support and internal request handling refactoring to better874 support pluggable applications.875- Sessions can be set to be permanent now on a per-session basis.876- Better error reporting on missing secret keys.877- Added support for Google Appengine.878879880Version 0.1881-----------882883Released 2010-04-16884934First public preview release.885- First public preview release.