remove reference links from 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 2869ddf · Browse files · 1 file·+193 added−217 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+193 added−217 removed
- other:+193 added−217 removed
Provenance
- Commit
363be75- Tree
5a55fd9- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
2869ddf
1 file changed+193 added−217 removed
modified:CHANGES.rst+193 added-217 removed
1-.. currentmodule:: flask2-1 Version 2.1.32 -------------3 4 Released 2022-07-13191 unmodified lines196 was not portable outside the ``flask`` command. Use197 ``click.get_current_context().obj`` if it's needed. :issue:`3552`198 - The CLI shows better error messages when the app failed to load199 when looking up commands. :issue:`2741`202-- Add :meth:`sessions.SessionInterface.get_cookie_name` to allow203- setting the session cookie name dynamically. :pr:`3369`204-- Add :meth:`Config.from_file` to load config using arbitrary file200+- Add ``SessionInterface.get_cookie_name`` to allow setting the201+ session cookie name dynamically. :pr:`3369`202+- Add ``Config.from_file`` to load config using arbitrary file203 loaders, such as ``toml.load`` or ``json.load``.206- :meth:`Config.from_json` is deprecated in favor of this. :pr:`3398`204+ ``Config.from_json`` is deprecated in favor of this. :pr:`3398`205 - The ``flask run`` command will only defer errors on reload. Errors206 present during the initial call will cause the server to exit with207 the traceback immediately. :issue:`3431`210-- :func:`send_file` raises a :exc:`ValueError` when passed an211- :mod:`io` object in text mode. Previously, it would respond with212- 200 OK and an empty file. :issue:`3358`208+- ``send_file`` raises a ``ValueError`` when passed an ``io`` object209+ in text mode. Previously, it would respond with 200 OK and an empty210+ file. :issue:`3358`211 - When using ad-hoc certificates, check for the cryptography library212 instead of PyOpenSSL. :pr:`3492`213 - When specifying a factory function with ``FLASK_APP``, keyword214 argument can be passed. :issue:`3553`102 unmodified lines317 directly to the handler. The same is true if the handler is for the318 base ``HTTPException``. This makes error handler behavior more319 consistent. :pr:`3266`320 323- - :meth:`Flask.finalize_request` is called for all unhandled321+ - ``Flask.finalize_request`` is called for all unhandled322 exceptions even if there is no ``500`` error handler.323 326-- :attr:`Flask.logger` takes the same name as327- :attr:`Flask.name` (the value passed as328- ``Flask(import_name)``. This reverts 1.0's behavior of always329- logging to ``"flask.app"``, in order to support multiple apps in the330- same process. A warning will be shown if old configuration is324+- ``Flask.logger`` takes the same name as ``Flask.name`` (the value325+ passed as ``Flask(import_name)``. This reverts 1.0's behavior of326+ always logging to ``"flask.app"``, in order to support multiple apps327+ in the same process. A warning will be shown if old configuration is328 detected that needs to be moved. :issue:`2866`332-- :meth:`flask.RequestContext.copy` includes the current session333- object in the request context copy. This prevents ``session``334- pointing to an out-of-date object. :issue:`2935`329+- ``RequestContext.copy`` includes the current session object in the330+ request context copy. This prevents ``session`` pointing to an331+ out-of-date object. :issue:`2935`332 - Using built-in RequestContext, unprintable Unicode characters in333 Host header will result in a HTTP 400 response and not HTTP 500 as334 previously. :pr:`2994`338-- :func:`send_file` supports :class:`~os.PathLike` objects as339- described in PEP 0519, to support :mod:`pathlib` in Python 3.340- :pr:`3059`341-- :func:`send_file` supports :class:`~io.BytesIO` partial content.335+- ``send_file`` supports ``PathLike`` objects as described in336+ :pep:`519`, to support ``pathlib`` in Python 3. :pr:`3059`337+- ``send_file`` supports ``BytesIO`` partial content.338 :issue:`2957`343-- :func:`open_resource` accepts the "rt" file mode. This still does344- the same thing as "r". :issue:`3163`345-- The :attr:`MethodView.methods` attribute set in a base class is used346- by subclasses. :issue:`3138`347-- :attr:`Flask.jinja_options` is a ``dict`` instead of an339+- ``open_resource`` accepts the "rt" file mode. This still does the340+ same thing as "r". :issue:`3163`341+- The ``MethodView.methods`` attribute set in a base class is used by342+ subclasses. :issue:`3138`343+- ``Flask.jinja_options`` is a ``dict`` instead of an344 ``ImmutableDict`` to allow easier configuration. Changes must still345 be made before creating the environment. :pr:`3190`346 - Flask's ``JSONMixin`` for the request and response wrappers was347 moved into Werkzeug. Use Werkzeug's version with Flask-specific5 unmodified lines353 - Support ``static_url_path`` that ends with a forward slash.354 :issue:`3134`355 - Support empty ``static_folder`` without requiring setting an empty356 ``static_url_path`` as well. :pr:`3124`361-- :meth:`jsonify` supports :class:`dataclasses.dataclass` objects.362- :pr:`3195`363-- Allow customizing the :attr:`Flask.url_map_class` used for routing.357+- ``jsonify`` supports ``dataclass`` objects. :pr:`3195`358+- Allow customizing the ``Flask.url_map_class`` used for routing.359 :pr:`3069`360 - The development server port can be set to 0, which tells the OS to361 pick an available port. :issue:`2926`367-- The return value from :meth:`cli.load_dotenv` is more consistent368- with the documentation. It will return ``False`` if python-dotenv is369- not installed, or if the given path isn't a file. :issue:`2937`362+- The return value from ``cli.load_dotenv`` is more consistent with363+ the documentation. It will return ``False`` if python-dotenv is not364+ installed, or if the given path isn't a file. :issue:`2937`365 - Signaling support has a stub for the ``connect_via`` method when366 the Blinker library is not installed. :pr:`3208`367 - Add an ``--extra-files`` option to the ``flask run`` CLI command to368 specify extra files that will trigger the reloader on change.30 unmodified lines399 outside debug mode, so error handlers can still access it. This400 requires upgrading to Werkzeug 0.15.5. :issue:`3249`401 - ``send_file`` url quotes the ":" and "/" characters for more402 compatible UTF-8 filename support in some browsers. :issue:`3074`408-- Fixes for PEP451 import loaders and pytest 5.x. :issue:`3275`403+- Fixes for :pep:`451` import loaders and pytest 5.x. :issue:`3275`404 - Show message about dotenv on stderr instead of stdout. :issue:`3285`405 406 407 Version 1.0.3408 -------------409 410 Released 2019-05-17411 417-- :func:`send_file` encodes filenames as ASCII instead of Latin-1412+- ``send_file`` encodes filenames as ASCII instead of Latin-1413 (ISO-8859-1). This fixes compatibility with Gunicorn, which is419- stricter about header encodings than PEP 3333. :issue:`2766`414+ stricter about header encodings than :pep:`3333`. :issue:`2766`415 - Allow custom CLIs using ``FlaskGroup`` to set the debug flag without416 it always being overwritten based on environment variables.417 :pr:`2765`418 - ``flask --version`` outputs Werkzeug's version and simplifies the419 Python version. :pr:`2825`425-- :func:`send_file` handles an ``attachment_filename`` that is a426- native Python 2 string (bytes) with UTF-8 coded bytes. :issue:`2933`420+- ``send_file`` handles an ``attachment_filename`` that is a native421+ Python 2 string (bytes) with UTF-8 coded bytes. :issue:`2933`422 - A catch-all error handler registered for ``HTTPException`` will not423 handle ``RoutingException``, which is used internally during424 routing. This fixes the unexpected behavior that had been introduced425 in 1.0. :pr:`2986`39 unmodified lines465 - Python 2.6 and 3.3 are no longer supported.466 - Bump minimum dependency versions to the latest stable versions:467 Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1.468 :issue:`2586`474-- Skip :meth:`app.run <Flask.run>` when a Flask application is run475- from the command line. This avoids some behavior that was confusing476- to debug.477-- Change the default for :data:`JSONIFY_PRETTYPRINT_REGULAR` to478- ``False``. :func:`~json.jsonify` returns a compact format by479- default, and an indented format in debug mode. :pr:`2193`480-- :meth:`Flask.__init__ <Flask>` accepts the ``host_matching``481- argument and sets it on :attr:`~Flask.url_map`. :issue:`1559`482-- :meth:`Flask.__init__ <Flask>` accepts the ``static_host`` argument483- and passes it as the ``host`` argument when defining the static484- route. :issue:`1559`485-- :func:`send_file` supports Unicode in ``attachment_filename``.469+- Skip ``app.run`` when a Flask application is run from the command470+ line. This avoids some behavior that was confusing to debug.471+- Change the default for ``JSONIFY_PRETTYPRINT_REGULAR`` to472+ ``False``. ``~json.jsonify`` returns a compact format by default,473+ and an indented format in debug mode. :pr:`2193`474+- ``Flask.__init__`` accepts the ``host_matching`` argument and sets475+ it on ``Flask.url_map``. :issue:`1559`476+- ``Flask.__init__`` accepts the ``static_host`` argument and passes477+ it as the ``host`` argument when defining the static route.478+ :issue:`1559`479+- ``send_file`` supports Unicode in ``attachment_filename``.480 :pr:`2223`487-- Pass ``_scheme`` argument from :func:`url_for` to488- :meth:`~Flask.handle_url_build_error`. :pr:`2017`489-- :meth:`~Flask.add_url_rule` accepts the490- ``provide_automatic_options`` argument to disable adding the491- ``OPTIONS`` method. :pr:`1489`492-- :class:`~views.MethodView` subclasses inherit method handlers from493- base classes. :pr:`1936`481+- Pass ``_scheme`` argument from ``url_for`` to482+ ``Flask.handle_url_build_error``. :pr:`2017`483+- ``Flask.add_url_rule`` accepts the ``provide_automatic_options``484+ argument to disable adding the ``OPTIONS`` method. :pr:`1489`485+- ``MethodView`` subclasses inherit method handlers from base classes.486+ :pr:`1936`487 - Errors caused while opening the session at the beginning of the488 request are handled by the app's error handlers. :pr:`2254`496-- Blueprints gained :attr:`~Blueprint.json_encoder` and497- :attr:`~Blueprint.json_decoder` attributes to override the app's489+- Blueprints gained ``Blueprint.json_encoder`` and490+ ``Blueprint.json_decoder`` attributes to override the app's491 encoder and decoder. :pr:`1898`499-- :meth:`Flask.make_response` raises ``TypeError`` instead of492+- ``Flask.make_response`` raises ``TypeError`` instead of493 ``ValueError`` for bad response types. The error messages have been494 improved to describe why the type is invalid. :pr:`2256`495 - Add ``routes`` CLI command to output routes registered on the496 application. :pr:`2259`6 unmodified lines503 - Auto-detect zero-argument app factory called ``create_app`` or504 ``make_app`` from ``FLASK_APP``. :pr:`2297`505 - Factory functions are not required to take a ``script_info``506 parameter to work with the ``flask`` command. If they take a single514- parameter or a parameter named ``script_info``, the515- :class:`~cli.ScriptInfo` object will be passed. :pr:`2319`507+ parameter or a parameter named ``script_info``, the ``ScriptInfo``508+ object will be passed. :pr:`2319`509 - ``FLASK_APP`` can be set to an app factory, with arguments if510 needed, for example ``FLASK_APP=myproject.app:create_app('dev')``.511 :pr:`2326`512 - ``FLASK_APP`` can point to local packages that are not installed in513 editable mode, although ``pip install -e`` is still preferred.514 :pr:`2414`522-- The :class:`~views.View` class attribute523- :attr:`~views.View.provide_automatic_options` is set in524- :meth:`~views.View.as_view`, to be detected by525- :meth:`~Flask.add_url_rule`. :pr:`2316`515+- The ``View`` class attribute516+ ``View.provide_automatic_options`` is set in ``View.as_view``, to be517+ detected by ``Flask.add_url_rule``. :pr:`2316`518 - Error handling will try handlers registered for ``blueprint, code``,519 ``app, code``, ``blueprint, exception``, ``app, exception``.520 :pr:`2314`521 - ``Cookie`` is added to the response's ``Vary`` header if the session522 is accessed at all during the request (and not deleted). :pr:`2288`531-- :meth:`~Flask.test_request_context` accepts ``subdomain`` and523+- ``Flask.test_request_context`` accepts ``subdomain`` and524 ``url_scheme`` arguments for use when building the base URL.525 :pr:`1621`534-- Set :data:`APPLICATION_ROOT` to ``'/'`` by default. This was already535- the implicit default when it was set to ``None``.536-- :data:`TRAP_BAD_REQUEST_ERRORS` is enabled by default in debug mode.526+- Set ``APPLICATION_ROOT`` to ``'/'`` by default. This was already the527+ implicit default when it was set to ``None``.528+- ``TRAP_BAD_REQUEST_ERRORS`` is enabled by default in debug mode.529 ``BadRequestKeyError`` has a message with the bad key in debug mode530 instead of the generic bad request message. :pr:`2348`539-- Allow registering new tags with540- :class:`~json.tag.TaggedJSONSerializer` to support storing other541- types in the session cookie. :pr:`2352`531+- Allow registering new tags with ``TaggedJSONSerializer`` to support532+ storing other types in the session cookie. :pr:`2352`533 - Only open the session if the request has not been pushed onto the543- context stack yet. This allows :func:`~stream_with_context`544- generators to access the same session that the containing view uses.545- :pr:`2354`534+ context stack yet. This allows ``stream_with_context`` generators to535+ access the same session that the containing view uses. :pr:`2354`536 - Add ``json`` keyword argument for the test client request methods.537 This will dump the given object as JSON and set the appropriate538 content type. :pr:`2358`549-- Extract JSON handling to a mixin applied to both the550- :class:`Request` and :class:`Response` classes. This adds the551- :meth:`~Response.is_json` and :meth:`~Response.get_json` methods to552- the response to make testing JSON response much easier. :pr:`2358`539+- Extract JSON handling to a mixin applied to both the ``Request`` and540+ ``Response`` classes. This adds the ``Response.is_json`` and541+ ``Response.get_json`` methods to the response to make testing JSON542+ response much easier. :pr:`2358`543 - Removed error handler caching because it caused unexpected results544 for some exception inheritance hierarchies. Register handlers545 explicitly for each exception if you want to avoid traversing the546 MRO. :pr:`2362`547 - Fix incorrect JSON encoding of aware, non-UTC datetimes. :pr:`2374`548 - Template auto reloading will honor debug mode even even if559- :attr:`~Flask.jinja_env` was already accessed. :pr:`2373`549+ ``Flask.jinja_env`` was already accessed. :pr:`2373`550 - The following old deprecated code was removed. :issue:`2385`551 552 - ``flask.ext`` - import extensions directly by their name instead553 of through the ``flask.ext`` namespace. For example,554 ``import flask.ext.sqlalchemy`` becomes555 ``import flask_sqlalchemy``.556 - ``Flask.init_jinja_globals`` - extend567- :meth:`Flask.create_jinja_environment` instead.557+ ``Flask.create_jinja_environment`` instead.558 - ``Flask.error_handlers`` - tracked by569- :attr:`Flask.error_handler_spec`, use :meth:`Flask.errorhandler`559+ ``Flask.error_handler_spec``, use ``Flask.errorhandler``560 to register handlers.561 - ``Flask.request_globals_class`` - use572- :attr:`Flask.app_ctx_globals_class` instead.573- - ``Flask.static_path`` - use :attr:`Flask.static_url_path`574- instead.575- - ``Request.module`` - use :attr:`Request.blueprint` instead.562+ ``Flask.app_ctx_globals_class`` instead.563+ - ``Flask.static_path`` - use ``Flask.static_url_path`` instead.564+ - ``Request.module`` - use ``Request.blueprint`` instead.565 577-- The :attr:`Request.json` property is no longer deprecated.578- :issue:`1421`579-- Support passing a :class:`~werkzeug.test.EnvironBuilder` or ``dict``580- to :meth:`test_client.open <werkzeug.test.Client.open>`. :pr:`2412`581-- The ``flask`` command and :meth:`Flask.run` will load environment566+- The ``Request.json`` property is no longer deprecated. :issue:`1421`567+- Support passing a ``EnvironBuilder`` or ``dict`` to568+ ``test_client.open``. :pr:`2412`569+- The ``flask`` command and ``Flask.run`` will load environment570 variables from ``.env`` and ``.flaskenv`` files if python-dotenv is571 installed. :pr:`2416`572 - When passing a full URL to the test client, the scheme in the URL is585- used instead of :data:`PREFERRED_URL_SCHEME`. :pr:`2430`586-- :attr:`Flask.logger` has been simplified. ``LOGGER_NAME`` and573+ used instead of ``PREFERRED_URL_SCHEME``. :pr:`2430`574+- ``Flask.logger`` has been simplified. ``LOGGER_NAME`` and575 ``LOGGER_HANDLER_POLICY`` config was removed. The logger is always576 named ``flask.app``. The level is only set on first access, it589- doesn't check :attr:`Flask.debug` each time. Only one format is590- used, not different ones depending on :attr:`Flask.debug`. No591- handlers are removed, and a handler is only added if no handlers are592- already configured. :pr:`2436`577+ doesn't check ``Flask.debug`` each time. Only one format is used,578+ not different ones depending on ``Flask.debug``. No handlers are579+ removed, and a handler is only added if no handlers are already580+ configured. :pr:`2436`581 - Blueprint view function names may not contain dots. :pr:`2450`582 - Fix a ``ValueError`` caused by invalid ``Range`` requests in some583 cases. :issue:`2526`584 - The development server uses threads by default. :pr:`2529`597-- Loading config files with ``silent=True`` will ignore598- :data:`~errno.ENOTDIR` errors. :pr:`2581`585+- Loading config files with ``silent=True`` will ignore ``ENOTDIR``586+ errors. :pr:`2581`587 - Pass ``--cert`` and ``--key`` options to ``flask run`` to run the588 development server over HTTPS. :pr:`2606`601-- Added :data:`SESSION_COOKIE_SAMESITE` to control the ``SameSite``589+- Added ``SESSION_COOKIE_SAMESITE`` to control the ``SameSite``590 attribute on the session cookie. :pr:`2607`603-- Added :meth:`~flask.Flask.test_cli_runner` to create a Click runner604- that can invoke Flask CLI commands for testing. :pr:`2636`591+- Added ``Flask.test_cli_runner`` to create a Click runner that can592+ invoke Flask CLI commands for testing. :pr:`2636`593 - Subdomain matching is disabled by default and setting606- :data:`SERVER_NAME` does not implicitly enable it. It can be enabled607- by passing ``subdomain_matching=True`` to the ``Flask`` constructor.594+ ``SERVER_NAME`` does not implicitly enable it. It can be enabled by595+ passing ``subdomain_matching=True`` to the ``Flask`` constructor.596 :pr:`2635`597 - A single trailing slash is stripped from the blueprint598 ``url_prefix`` when it is registered with the app. :pr:`2629`611-- :meth:`Request.get_json` doesn't cache the result if parsing fails612- when ``silent`` is true. :issue:`2651`613-- :func:`Request.get_json` no longer accepts arbitrary encodings.614- Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but615- Flask will autodetect UTF-8, -16, or -32. :pr:`2691`616-- Added :data:`MAX_COOKIE_SIZE` and :attr:`Response.max_cookie_size`617- to control when Werkzeug warns about large cookies that browsers may599+- ``Request.get_json`` doesn't cache the result if parsing fails when600+ ``silent`` is true. :issue:`2651`601+- ``Request.get_json`` no longer accepts arbitrary encodings. Incoming602+ JSON should be encoded using UTF-8 per :rfc:`8259`, but Flask will603+ autodetect UTF-8, -16, or -32. :pr:`2691`604+- Added ``MAX_COOKIE_SIZE`` and ``Response.max_cookie_size`` to605+ control when Werkzeug warns about large cookies that browsers may606 ignore. :pr:`2693`607 - Updated documentation theme to make docs look better in small608 windows. :pr:`2709`609 - Rewrote the tutorial docs and example project to take a more21 unmodified lines631 --------------632 633 Released 2018-04-26634 647-- :func:`Request.get_json` no longer accepts arbitrary encodings.635+- ``Request.get_json`` no longer accepts arbitrary encodings.636 Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but637 Flask will autodetect UTF-8, -16, or -32. :issue:`2692`638 - Fix a Python warning about imports when using ``python -m flask``.639 :issue:`2666`61 unmodified lines701 ------------702 703 Released 2016-05-29, codename Absinthe704 717-- Added support to serializing top-level arrays to718- :func:`flask.jsonify`. This introduces a security risk in ancient719- browsers.705+- Added support to serializing top-level arrays to ``jsonify``. This706+ introduces a security risk in ancient browsers.707 - Added before_render_template signal.721-- Added ``**kwargs`` to :meth:`flask.Test.test_client` to support722- passing additional keyword arguments to the constructor of723- :attr:`flask.Flask.test_client_class`.708+- Added ``**kwargs`` to ``Flask.test_client`` to support passing709+ additional keyword arguments to the constructor of710+ ``Flask.test_client_class``.711 - Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the712 set-cookie behavior. If set to ``True`` a permanent session will be713 refreshed each request and get their lifetime extended, if set to714 ``False`` it will only be modified if the session actually modifies.1 unmodified line716 expire if the browser window closes.717 - Made Flask support custom JSON mimetypes for incoming data.718 - Added support for returning tuples in the form ``(response,719 headers)`` from a view function.733-- Added :meth:`flask.Config.from_json`.734-- Added :attr:`flask.Flask.config_class`.735-- Added :meth:`flask.Config.get_namespace`.720+- Added ``Config.from_json``.721+- Added ``Flask.config_class``.722+- Added ``Config.get_namespace``.723 - Templates are no longer automatically reloaded outside of debug724 mode. This can be configured with the new ``TEMPLATES_AUTO_RELOAD``725 config key.726 - Added a workaround for a limitation in Python 3.3's namespace727 loader.728 - Added support for explicit root paths when using Python 3.3's729 namespace packages.743-- Added :command:`flask` and the ``flask.cli`` module to start the730+- Added ``flask`` and the ``flask.cli`` module to start the731 local debug server through the click CLI system. This is recommended732 over the old ``flask.run()`` method as it works faster and more733 reliable due to a different design and also replaces734 ``Flask-Script``.2 unmodified lines737 exceptions (in ``werkzeug.exceptions``). This makes it possible for738 an extension author to create exceptions that will by default result739 in the HTTP error of their choosing, but may be caught with a custom740 error handler if desired.754-- Added :meth:`flask.Config.from_mapping`.741+- Added ``Config.from_mapping``.742 - Flask will now log by default even if debug is disabled. The log743 format is now hardcoded but the default log handling can be disabled744 through the ``LOGGER_HANDLER_POLICY`` configuration key.745 - Removed deprecated module functionality.9 unmodified lines755 ``JSONIFY_PRETTYPRINT_REGULAR=False`` by removing unnecessary white756 space included by default after separators.757 - JSON responses are now terminated with a newline character, because758 it is a convention that UNIX text files end with a newline and some772- clients don't deal well when this newline is missing. This came up773- originally as a part of774- https://github.com/postmanlabs/httpbin/issues/168. :pr:`1262`759+ clients don't deal well when this newline is missing. :pr:`1262`760 - The automatically provided ``OPTIONS`` method is now correctly761 disabled if the user registered an overriding rule with the762 lowercase-version ``options``. :issue:`1288`763 - ``flask.json.jsonify`` now supports the ``datetime.date`` type.11 unmodified lines775 - Added the ``JSONIFY_MIMETYPE`` configuration variable. :pr:`1728`776 - Exceptions during teardown handling will no longer leave bad777 application contexts lingering around.778 - Fixed broken ``test_appcontext_signals()`` test case.794-- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package`795- with a useful message explaining why it is raised when a PEP 302796- import hook is used without an ``is_package()`` method.779+- Raise an ``AttributeError`` in ``helpers.find_package`` with a780+ useful message explaining why it is raised when a :pep:`302` import781+ hook is used without an ``is_package()`` method.782 - Fixed an issue causing exceptions raised before entering a request783 or app context to be passed to teardown handlers.784 - Fixed an issue with query parameters getting removed from requests785 in the test client when absolute URLs were requested.107 unmodified lines893 -----------894 895 Released 2012-07-01, codename Campari896 912-- The :func:`flask.Request.on_json_loading_failed` now returns a JSON913- formatted response by default.914-- The :func:`flask.url_for` function now can generate anchors to the915- generated links.916-- The :func:`flask.url_for` function now can also explicitly generate917- URL rules specific to a given HTTP method.897+- The ``Request.on_json_loading_failed`` now returns a JSON formatted898+ response by default.899+- The ``url_for`` function now can generate anchors to the generated900+ links.901+- The ``url_for`` function now can also explicitly generate URL rules902+ specific to a given HTTP method.903 - Logger now only returns the debug log setting if it was not set904 explicitly.905 - Unregister a circular dependency between the WSGI environment and906 the request object when shutting down the request. This means that3 unmodified lines910 the user created circular dependencies themselves.911 - Session is now stored after callbacks so that if the session payload912 is stored in the session you can still modify it in an after request913 callback.929-- The :class:`flask.Flask` class will avoid importing the provided930- import name if it can (the required first parameter), to benefit931- tools which build Flask instances programmatically. The Flask class932- will fall back to using import on systems with custom module hooks,933- e.g. Google App Engine, or when the import name is inside a zip934- archive (usually a .egg) prior to Python 2.7.914+- The ``Flask`` class will avoid importing the provided import name if915+ it can (the required first parameter), to benefit tools which build916+ Flask instances programmatically. The Flask class will fall back to917+ using import on systems with custom module hooks, e.g. Google App918+ Engine, or when the import name is inside a zip archive (usually an919+ egg) prior to Python 2.7.920 - Blueprints now have a decorator to add custom template filters936- application wide, :meth:`flask.Blueprint.app_template_filter`.921+ application wide, ``Blueprint.app_template_filter``.922 - The Flask and Blueprint classes now have a non-decorator method for923 adding custom template filters application wide,939- :meth:`flask.Flask.add_template_filter` and940- :meth:`flask.Blueprint.add_app_template_filter`.941-- The :func:`flask.get_flashed_messages` function now allows rendering942- flashed message categories in separate blocks, through a943- ``category_filter`` argument.944-- The :meth:`flask.Flask.run` method now accepts ``None`` for ``host``945- and ``port`` arguments, using default values when ``None``. This946- allows for calling run using configuration values, e.g.924+ ``Flask.add_template_filter`` and925+ ``Blueprint.add_app_template_filter``.926+- The ``get_flashed_messages`` function now allows rendering flashed927+ message categories in separate blocks, through a ``category_filter``928+ argument.929+- The ``Flask.run`` method now accepts ``None`` for ``host`` and930+ ``port`` arguments, using default values when ``None``. This allows931+ for calling run using configuration values, e.g.932 ``app.run(app.config.get('MYHOST'), app.config.get('MYPORT'))``,933 with proper behavior whether or not a config file is provided.949-- The :meth:`flask.render_template` method now accepts a either an950- iterable of template names or a single template name. Previously, it951- only accepted a single template name. On an iterable, the first952- template found is rendered.953-- Added :meth:`flask.Flask.app_context` which works very similar to954- the request context but only provides access to the current955- application. This also adds support for URL generation without an956- active request context.934+- The ``render_template`` method now accepts a either an iterable of935+ template names or a single template name. Previously, it only936+ accepted a single template name. On an iterable, the first template937+ found is rendered.938+- Added ``Flask.app_context`` which works very similar to the request939+ context but only provides access to the current application. This940+ also adds support for URL generation without an active request941+ context.942 - View functions can now return a tuple with the first instance being958- an instance of :class:`flask.Response`. This allows for returning943+ an instance of ``Response``. This allows for returning944 ``jsonify(error="error msg"), 400`` from a view function.960-- :class:`~flask.Flask` and :class:`~flask.Blueprint` now provide a961- :meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to962- override behavior of serving static files from Flask when using963- :meth:`flask.Flask.send_static_file` (used for the default static964- file handler) and :func:`~flask.helpers.send_file`. This hook is945+- ``Flask`` and ``Blueprint`` now provide a ``get_send_file_max_age``946+ hook for subclasses to override behavior of serving static files947+ from Flask when using ``Flask.send_static_file`` (used for the948+ default static file handler) and ``helpers.send_file``. This hook is949 provided a filename, which for example allows changing cache950 controls by file extension. The default max-age for ``send_file``951 and static files can be configured through a new952 ``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, which is used3 unmodified lines956 storage.957 - Changed the behavior of tuple return values from functions. They are958 no longer arguments to the response object, they now have a defined959 meaning.976-- Added :attr:`flask.Flask.request_globals_class` to allow a specific977- class to be used on creation of the :data:`~flask.g` instance of978- each request.960+- Added ``Flask.request_globals_class`` to allow a specific class to961+ be used on creation of the ``g`` instance of each request.962 - Added ``required_methods`` attribute to view functions to force-add963 methods on registration.981-- Added :func:`flask.after_this_request`.982-- Added :func:`flask.stream_with_context` and the ability to push983- contexts multiple times without producing unexpected behavior.964+- Added ``flask.after_this_request``.965+- Added ``flask.stream_with_context`` and the ability to push contexts966+ multiple times without producing unexpected behavior.967 968 969 Version 0.8.1970 -------------24 unmodified lines995 view was attached after the first request was handled. This gives996 earlier feedback when users forget to import view code ahead of997 time.998 - Added the ability to register callbacks that are only triggered once1016- at the beginning of the first request.1017- (:meth:`Flask.before_first_request`)999+ at the beginning of the first request with1000+ ``Flask.before_first_request``.1001 - Malformed JSON data will now trigger a bad request HTTP exception1002 instead of a value error which usually would result in a 5001003 internal server error if not handled. This is a backwards1004 incompatible change.3 unmodified lines1008 etc.). Also this is conceptually only instance depending and outside1009 version control so it's the perfect place to put configuration files1010 etc.1011 - Added the ``APPLICATION_ROOT`` configuration variable.1029-- Implemented :meth:`~flask.testing.TestClient.session_transaction` to1030- easily modify sessions from the test environment.1012+- Implemented ``TestClient.session_transaction`` to easily modify1013+ sessions from the test environment.1014 - Refactored test client internally. The ``APPLICATION_ROOT``1015 configuration variable as well as ``SERVER_NAME`` are now properly1016 used by the test client as defaults.1034-- Added :attr:`flask.views.View.decorators` to support simpler1035- decorating of pluggable (class-based) views.1017+- Added ``View.decorators`` to support simpler decorating of pluggable1018+ (class-based) views.1019 - Fixed an issue where the test client if used with the "with"1020 statement did not trigger the execution of the teardown handlers.1021 - Added finer control over the session cookie parameters.1022 - HEAD requests to a method view now automatically dispatch to the1023 ``get`` method if no handler was implemented.1041-- Implemented the virtual :mod:`flask.ext` package to import1042- extensions from.1024+- Implemented the virtual ``flask.ext`` package to import extensions1025+ from.1026 - The context preservation on exceptions is now an integral component1027 of Flask itself and no longer of the test client. This cleaned up1028 some internal logic and lowers the odds of runaway request contexts1029 in unittests.24 unmodified lines1054 -----------1055 1056 Released 2011-06-28, codename Grappa1057 1075-- Added :meth:`~flask.Flask.make_default_options_response` which can1076- be used by subclasses to alter the default behavior for ``OPTIONS``1077- responses.1078-- Unbound locals now raise a proper :exc:`RuntimeError` instead of an1079- :exc:`AttributeError`.1058+- Added ``Flask.make_default_options_response`` which can be used by1059+ subclasses to alter the default behavior for ``OPTIONS`` responses.1060+- Unbound locals now raise a proper ``RuntimeError`` instead of an1061+ ``AttributeError``.1062 - Mimetype guessing and etag support based on file objects is now1081- deprecated for :func:`flask.send_file` because it was unreliable.1082- Pass filenames instead or attach your own etags and provide a proper1063+ deprecated for ``send_file`` because it was unreliable. Pass1064+ filenames instead or attach your own etags and provide a proper1065 mimetype by hand.1066 - Static file handling for modules now requires the name of the static1067 folder to be supplied explicitly. The previous autodetection was not1068 reliable and caused issues on Google's App Engine. Until 1.0 the old17 unmodified lines1086 - Added ``teardown_request`` decorator, for functions that should run1087 at the end of a request regardless of whether an exception occurred.1088 Also the behavior for ``after_request`` was changed. It's now no1089 longer executed when an exception is raised.1108-- Implemented :func:`flask.has_request_context`1090+- Implemented ``has_request_context``.1091 - Deprecated ``init_jinja_globals``. Override the1110- :meth:`~flask.Flask.create_jinja_environment` method instead to1111- achieve the same functionality.1112-- Added :func:`flask.safe_join`1092+ ``Flask.create_jinja_environment`` method instead to achieve the1093+ same functionality.1094+- Added ``safe_join``.1095 - The automatic JSON request data unpacking now looks at the charset1096 mimetype parameter.1115-- Don't modify the session on :func:`flask.get_flashed_messages` if1116- there are no messages in the session.1097+- Don't modify the session on ``get_flashed_messages`` if there are no1098+ messages in the session.1099 - ``before_request`` handlers are now able to abort requests with1100 errors.1101 - It is not possible to define user exception handlers. That way you1102 can provide custom error messages from a central hub for certain33 unmodified lines1136 this case no automatic OPTIONS handling kicks in.1137 - Static rules are now even in place if there is no static folder for1138 the module. This was implemented to aid GAE which will remove the1139 static folder if it's part of a mapping in the .yml file.1158-- The :attr:`~flask.Flask.config` is now available in the templates as1159- ``config``.1140+- ``Flask.config`` is now available in the templates as ``config``.1141 - Context processors will no longer override values passed directly to1142 the render function.1143 - Added the ability to limit the incoming request data with the new1144 ``MAX_CONTENT_LENGTH`` configuration value.1164-- The endpoint for the :meth:`flask.Module.add_url_rule` method is now1165- optional to be consistent with the function of the same name on the1145+- The endpoint for the ``Module.add_url_rule`` method is now optional1146+ to be consistent with the function of the same name on the1147 application object.1167-- Added a :func:`flask.make_response` function that simplifies1168- creating response object instances in views.1148+- Added a ``make_response`` function that simplifies creating response1149+ object instances in views.1150 - Added signalling support based on blinker. This feature is currently1151 optional and supposed to be used by extensions and applications. If1171- you want to use it, make sure to have `blinker`_ installed.1152+ you want to use it, make sure to have ``blinker`` installed.1153 - Refactored the way URL adapters are created. This process is now1173- fully customizable with the :meth:`~flask.Flask.create_url_adapter`1174- method.1154+ fully customizable with the ``Flask.create_url_adapter`` method.1155 - Modules can now register for a subdomain instead of just an URL1156 prefix. This makes it possible to bind a whole module to a1157 configurable subdomain.1158 1179-.. _blinker: https://pypi.org/project/blinker/1159 1181-1160 Version 0.5.21161 -------------1162 1163 Released 2010-07-1524 unmodified lines1188 only active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``. Inside1189 templates this behavior can be changed with the ``autoescape`` tag.1190 - Refactored Flask internally. It now consists of more than a single1191 file.1214-- :func:`flask.send_file` now emits etags and has the ability to do1215- conditional responses builtin.1192+- ``send_file`` now emits etags and has the ability to do conditional1193+ responses builtin.1194 - (temporarily) dropped support for zipped applications. This was a1195 rarely used feature and led to some confusing behavior.1196 - Added support for per-package template and static-file directories.1197 - Removed support for ``create_jinja_loader`` which is no longer used7 unmodified lines1205 Released 2010-06-18, codename Rakia1206 1207 - Added the ability to register application wide error handlers from1208 modules.1231-- :meth:`~flask.Flask.after_request` handlers are now also invoked if1232- the request dies with an exception and an error handling page kicks1233- in.1209+- ``Flask.after_request`` handlers are now also invoked if the request1210+ dies with an exception and an error handling page kicks in.1211 - Test client has not the ability to preserve the request context for1212 a little longer. This can also be used to trigger custom requests1213 that do not pop the request stack for testing.1214 - Because the Python standard library caches loggers, the name of the6 unmodified lines1221 -------------1222 1223 Released 2010-05-281224 1248-- Fixed a error reporting bug with :meth:`flask.Config.from_envvar`1249-- Removed some unused code from flask1225+- Fixed a error reporting bug with ``Config.from_envvar``.1226+- Removed some unused code.1227 - Release does no longer include development leftover files (.git1228 folder for themes, built documentation in zip and pdf file and some1229 .pyc files)1230 3 unmodified lines1234 1235 Released 2010-05-28, codename Schnaps1236 1237 - Added support for categories for flashed messages.1261-- The application now configures a :class:`logging.Handler` and will1262- log request handling exceptions to that logger when not in debug1263- mode. This makes it possible to receive mails on server errors for1238+- The application now configures a ``logging.Handler`` and will log1239+ request handling exceptions to that logger when not in debug mode.1240+ This makes it possible to receive mails on server errors for1241 example.1242 - Added support for context binding that does not require the use of1243 the with statement for playing in the console.1244 - The request context is now available within the with statement7 unmodified lines1252 Released 2010-05-12, codename J?germeister1253 1254 - Various bugfixes1255 - Integrated JSON support1279-- Added :func:`~flask.get_template_attribute` helper function.1280-- :meth:`~flask.Flask.add_url_rule` can now also register a view1281- function.1256+- Added ``get_template_attribute`` helper function.1257+- ``Flask.add_url_rule`` can now also register a view function.1258 - Refactored internal request dispatching.1259 - Server listens on 127.0.0.1 by default now to fix issues with1260 chrome.1261 - Added external URL support.1286-- Added support for :func:`~flask.send_file`1262+- Added support for ``send_file``.1263 - Module support and internal request handling refactoring to better1264 support pluggable applications.1265 - Sessions can be set to be permanent now on a per-session basis.1266 - Better error reporting on missing secret keys.9 unmodified lines