Skip to content
Myr

Merge branch '1.0.x'

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 · parents 1351d0a, 6ed68f0 · Browse files · 2 files+420 added−410 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+420 added−410 removed

  • other:+420 added−410 removed

2 files+420 added−410 removed

modified:src/flask/app.py+5 added-5 removed
1795 unmodified lines
1796 # trap_http_exception method so that's their fault then.17971798 if isinstance(e, BadRequestKeyError):1799 if self.debug or self.config["TRAP_BAD_REQUEST_ERRORS"]:1800 e.show_exception = True18011802 # Werkzeug < 0.15 doesn't add the KeyError to the 4001803 # message, add it in manually.1802 description = e.get_description()18031804 if e.args[0] not in description:1804 # TODO: clean up once Werkzeug >= 0.15.5 is required1805 if e.args[0] not in e.get_description():1806 e.description = "KeyError: '{}'".format(*e.args)1806 else:1807 # Werkzeug >= 0.15 does add it, remove it in production1807 elif not hasattr(BadRequestKeyError, "show_exception"):1808 e.args = ()18091810 if isinstance(e, HTTPException) and not self.trap_http_exception(e):1811 return self.handle_http_exception(e)
651 unmodified lines
modified:CHANGES.rst+415 added-405 removed
5 unmodified lines
6Unreleased78- Bump minimum Werkzeug version to >= 0.15.9- Drop support for Python 3.4.10- Error handlers for ``InternalServerError`` or ``500`` will always be11 passed an instance of ``InternalServerError``. If they are invoked10- Error handlers for ��InternalServerError�� or ��500�� will always be11 passed an instance of ��InternalServerError��. If they are invoked12 due to an unhandled exception, that original exception is now13 available as ``e.original_exception`` rather than being passed13 available as ��e.original_exception�� rather than being passed14 directly to the handler. The same is true if the handler is for the15 base ``HTTPException``. This makes error handler behavior more16 consistent. :pr:`3266`15 base ��HTTPException��. This makes error handler behavior more16 consistent. :pr:�3266�1718 - :meth:`Flask.finalize_request` is called for all unhandled19 exceptions even if there is no ``500`` error handler.18 - :meth:�Flask.finalize_request� is called for all unhandled19 exceptions even if there is no ��500�� error handler.2021- :meth:`flask.RequestContext.copy` includes the current session22 object in the request context copy. This prevents ``session``23 pointing to an out-of-date object. :issue:`2935`21- :meth:�flask.RequestContext.copy� includes the current session22 object in the request context copy. This prevents ��session��23 pointing to an out-of-date object. :issue:�2935�24- Using built-in RequestContext, unprintable Unicode characters in25 Host header will result in a HTTP 400 response and not HTTP 500 as26 previously. :pr:`2994`27- :func:`send_file` supports :class:`~os.PathLike` objects as28 described in PEP 0519, to support :mod:`pathlib` in Python 3.29 :pr:`3059`30- :func:`send_file` supports :class:`~io.BytesIO` partial content.31 :issue:`2957`32- :func:`open_resource` accepts the "rt" file mode. This still does33 the same thing as "r". :issue:`3163`34- The :attr:`MethodView.methods` attribute set in a base class is used35 by subclasses. :issue:`3138`36- :attr:`Flask.jinja_options` is a ``dict`` instead of an37 ``ImmutableDict`` to allow easier configuration. Changes must still38 be made before creating the environment. :pr:`3190`39- Flask's ``JSONMixin`` for the request and response wrappers was40 moved into Werkzeug. Use Werkzeug's version with Flask-specific26 previously. :pr:�2994�27- :func:�send_file� supports :class:�~os.PathLike� objects as28 described in PEP 0519, to support :mod:�pathlib� in Python 3.29 :pr:�3059�30- :func:�send_file� supports :class:�~io.BytesIO� partial content.31 :issue:�2957�32- :func:�open_resource� accepts the "rt" file mode. This still does33 the same thing as "r". :issue:�3163�34- The :attr:�MethodView.methods� attribute set in a base class is used35 by subclasses. :issue:�3138�36- :attr:�Flask.jinja_options� is a ��dict�� instead of an37 ��ImmutableDict�� to allow easier configuration. Changes must still38 be made before creating the environment. :pr:�3190�39- Flask�s ��JSONMixin�� for the request and response wrappers was40 moved into Werkzeug. Use Werkzeug�s version with Flask-specific41 support. This bumps the Werkzeug dependency to >= 0.15.42 :issue:`3125`43- The ``flask`` command entry point is simplified to take advantage44 of Werkzeug 0.15's better reloader support. This bumps the Werkzeug45 dependency to >= 0.15. :issue:`3022`46- Support ``static_url_path`` that ends with a forward slash.47 :issue:`3134`48- Support empty ``static_folder`` without requiring setting an empty49 ``static_url_path`` as well. :pr:`3124`50- :meth:`jsonify` supports :class:`dataclasses.dataclass` objects.51 :pr:`3195`52- Allow customizing the :attr:`Flask.url_map_class` used for routing.53 :pr:`3069`42 :issue:�3125�43- The ��flask�� command entry point is simplified to take advantage44 of Werkzeug 0.15�s better reloader support. This bumps the Werkzeug45 dependency to >= 0.15. :issue:�3022�46- Support ��static_url_path�� that ends with a forward slash.47 :issue:�3134�48- Support empty ��static_folder�� without requiring setting an empty49 ��static_url_path�� as well. :pr:�3124�50- :meth:�jsonify� supports :class:�dataclasses.dataclass� objects.51 :pr:�3195�52- Allow customizing the :attr:�Flask.url_map_class� used for routing.53 :pr:�3069�54- The development server port can be set to 0, which tells the OS to55 pick an available port. :issue:`2926`56- The return value from :meth:`cli.load_dotenv` is more consistent57 with the documentation. It will return ``False`` if python-dotenv is58 not installed, or if the given path isn't a file. :issue:`2937`59- Signaling support has a stub for the ``connect_via`` method when60 the Blinker library is not installed. :pr:`3208`61- Add an ``--extra-files`` option to the ``flask run`` CLI command to55 pick an available port. :issue:�2926�56- The return value from :meth:�cli.load_dotenv� is more consistent57 with the documentation. It will return ��False�� if python-dotenv is58 not installed, or if the given path isn�t a file. :issue:�2937�59- Signaling support has a stub for the ��connect_via�� method when60 the Blinker library is not installed. :pr:�3208�61- Add an ��--extra-files�� option to the ��flask run�� CLI command to62 specify extra files that will trigger the reloader on change.63 :issue:`2897`63 :issue:�2897�64- Allow returning a dictionary from a view function. Similar to how65 returning a string will produce a ``text/html`` response, returning66 a dict will call ``jsonify`` to produce a ``application/json``67 response. :pr:`3111`68- Blueprints have a ``cli`` Click group like ``app.cli``. CLI commands65 returning a string will produce a ��text/html�� response, returning66 a dict will call ��jsonify�� to produce a ��application/json��67 response. :pr:�3111�68- Blueprints have a ��cli�� Click group like ��app.cli��. CLI commands69 registered with a blueprint will be available as a group under the70 ``flask`` command. :issue:`1357`.71- When using the test client as a context manager (``with client:``),70 ��flask�� command. :issue:�1357�.71- When using the test client as a context manager (��with client:��),72 all preserved request contexts are popped when the block exits,73 ensuring nested contexts are cleaned up correctly. :pr:`3157`73 ensuring nested contexts are cleaned up correctly. :pr:�3157�74- Show a better error message when the view return type is not75 supported. :issue:`3214`76- ``flask.testing.make_test_environ_builder()`` has been deprecated in77 favour of a new class ``flask.testing.EnvironBuilder``. :pr:`3232`78- The ``flask run`` command no longer fails if Python is not built79 with SSL support. Using the ``--cert`` option will show an80 appropriate error message. :issue:`3211`75 supported. :issue:�3214�76- ��flask.testing.make_test_environ_builder()�� has been deprecated in77 favour of a new class ��flask.testing.EnvironBuilder��. :pr:�3232�78- The ��flask run�� command no longer fails if Python is not built79 with SSL support. Using the ��--cert�� option will show an80 appropriate error message. :issue:�3211�81- URL matching now occurs after the request context is pushed, rather82 than when it's created. This allows custom URL converters to access82 than when it�s created. This allows custom URL converters to access83 the app and request contexts, such as to query a database for an id.84 :issue:`3088`84 :issue:�3088�858687Version 1.0.488-------------8990Unreleased9192- The key information for ��BadRequestKeyError�� is no longer cleared93 outside debug mode, so error handlers can still access it. This94 requires upgrading to Werkzeug 0.15.5. :issue:�3249�959697Version 1.0.398-------------99100Released 2019-05-1710192- :func:`send_file` encodes filenames as ASCII instead of Latin-1102- :func:�send_file� encodes filenames as ASCII instead of Latin-1103 (ISO-8859-1). This fixes compatibility with Gunicorn, which is94 stricter about header encodings than PEP 3333. :issue:`2766`95- Allow custom CLIs using ``FlaskGroup`` to set the debug flag without104 stricter about header encodings than PEP 3333. :issue:�2766�105- Allow custom CLIs using ��FlaskGroup�� to set the debug flag without106 it always being overwritten based on environment variables.97 :pr:`2765`98- ``flask --version`` outputs Werkzeug's version and simplifies the99 Python version. :pr:`2825`100- :func:`send_file` handles an ``attachment_filename`` that is a101 native Python 2 string (bytes) with UTF-8 coded bytes. :issue:`2933`102- A catch-all error handler registered for ``HTTPException`` will not103 handle ``RoutingException``, which is used internally during107 :pr:�2765�108- ��flask --version�� outputs Werkzeug�s version and simplifies the109 Python version. :pr:�2825�110- :func:�send_file� handles an ��attachment_filename�� that is a111 native Python 2 string (bytes) with UTF-8 coded bytes. :issue:�2933�112- A catch-all error handler registered for ��HTTPException�� will not113 handle ��RoutingException��, which is used internally during114 routing. This fixes the unexpected behavior that had been introduced105 in 1.0. :pr:`2986`106- Passing the ``json`` argument to ``app.test_client`` does not107 push/pop an extra app context. :issue:`2900`115 in 1.0. :pr:�2986�116- Passing the ��json�� argument to ��app.test_client�� does not117 push/pop an extra app context. :issue:�2900�118119120Version 1.0.2121-------------122123Released 2018-05-02124125- Fix more backwards compatibility issues with merging slashes between116 a blueprint prefix and route. :pr:`2748`117- Fix error with ``flask routes`` command when there are no routes.118 :issue:`2751`126 a blueprint prefix and route. :pr:�2748�127- Fix error with ��flask routes�� command when there are no routes.128 :issue:�2751�129130131Version 1.0.1132-------------133134Released 2018-04-29135126- Fix registering partials (with no ``__name__``) as view functions.127 :pr:`2730`128- Don't treat lists returned from view functions the same as tuples.129 Only tuples are interpreted as response data. :issue:`2736`130- Extra slashes between a blueprint's ``url_prefix`` and a route URL136- Fix registering partials (with no ��__name__��) as view functions.137 :pr:�2730�138- Don�t treat lists returned from view functions the same as tuples.139 Only tuples are interpreted as response data. :issue:�2736�140- Extra slashes between a blueprint�s ��url_prefix�� and a route URL141 are merged. This fixes some backwards compatibility issues with the132 change in 1.0. :issue:`2731`, :issue:`2742`133- Only trap ``BadRequestKeyError`` errors in debug mode, not all134 ``BadRequest`` errors. This allows ``abort(400)`` to continue135 working as expected. :issue:`2735`136- The ``FLASK_SKIP_DOTENV`` environment variable can be set to ``1``137 to skip automatically loading dotenv files. :issue:`2722`142 change in 1.0. :issue:�2731�, :issue:�2742�143- Only trap ��BadRequestKeyError�� errors in debug mode, not all144 ��BadRequest�� errors. This allows ��abort(400)�� to continue145 working as expected. :issue:�2735�146- The ��FLASK_SKIP_DOTENV�� environment variable can be set to ��1��147 to skip automatically loading dotenv files. :issue:�2722�148149150Version 1.0151-----------
2 unmodified lines
154155- Python 2.6 and 3.3 are no longer supported.156- Bump minimum dependency versions to the latest stable versions:157 Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1.148 :issue:`2586`149- Skip :meth:`app.run <Flask.run>` when a Flask application is run158 :issue:�2586�159- Skip :meth:�app.run <Flask.run>� when a Flask application is run160 from the command line. This avoids some behavior that was confusing161 to debug.152- Change the default for :data:`JSONIFY_PRETTYPRINT_REGULAR` to153 ``False``. :func:`~json.jsonify` returns a compact format by154 default, and an indented format in debug mode. :pr:`2193`155- :meth:`Flask.__init__ <Flask>` accepts the ``host_matching``156 argument and sets it on :attr:`~Flask.url_map`. :issue:`1559`157- :meth:`Flask.__init__ <Flask>` accepts the ``static_host`` argument158 and passes it as the ``host`` argument when defining the static159 route. :issue:`1559`160- :func:`send_file` supports Unicode in ``attachment_filename``.161 :pr:`2223`162- Pass ``_scheme`` argument from :func:`url_for` to163 :meth:`~Flask.handle_url_build_error`. :pr:`2017`164- :meth:`~Flask.add_url_rule` accepts the165 ``provide_automatic_options`` argument to disable adding the166 ``OPTIONS`` method. :pr:`1489`167- :class:`~views.MethodView` subclasses inherit method handlers from168 base classes. :pr:`1936`162- Change the default for :data:�JSONIFY_PRETTYPRINT_REGULAR� to163 ��False��. :func:�~json.jsonify� returns a compact format by164 default, and an indented format in debug mode. :pr:�2193�165- :meth:�Flask.__init__ <Flask>� accepts the ��host_matching��166 argument and sets it on :attr:�~Flask.url_map�. :issue:�1559�167- :meth:�Flask.__init__ <Flask>� accepts the ��static_host�� argument168 and passes it as the ��host�� argument when defining the static169 route. :issue:�1559�170- :func:�send_file� supports Unicode in ��attachment_filename��.171 :pr:�2223�172- Pass ��_scheme�� argument from :func:�url_for� to173 :meth:�~Flask.handle_url_build_error�. :pr:�2017�174- :meth:�~Flask.add_url_rule� accepts the175 ��provide_automatic_options�� argument to disable adding the176 ��OPTIONS�� method. :pr:�1489�177- :class:�~views.MethodView� subclasses inherit method handlers from178 base classes. :pr:�1936�179- Errors caused while opening the session at the beginning of the170 request are handled by the app's error handlers. :pr:`2254`171- Blueprints gained :attr:`~Blueprint.json_encoder` and172 :attr:`~Blueprint.json_decoder` attributes to override the app's173 encoder and decoder. :pr:`1898`174- :meth:`Flask.make_response` raises ``TypeError`` instead of175 ``ValueError`` for bad response types. The error messages have been176 improved to describe why the type is invalid. :pr:`2256`177- Add ``routes`` CLI command to output routes registered on the178 application. :pr:`2259`180 request are handled by the app�s error handlers. :pr:�2254�181- Blueprints gained :attr:�~Blueprint.json_encoder� and182 :attr:�~Blueprint.json_decoder� attributes to override the app�s183 encoder and decoder. :pr:�1898�184- :meth:�Flask.make_response� raises ��TypeError�� instead of185 ��ValueError�� for bad response types. The error messages have been186 improved to describe why the type is invalid. :pr:�2256�187- Add ��routes�� CLI command to output routes registered on the188 application. :pr:�2259�189- Show warning when session cookie domain is a bare hostname or an IP190 address, as these may not behave properly in some browsers, such as181 Chrome. :pr:`2282`182- Allow IP address as exact session cookie domain. :pr:`2282`183- ``SESSION_COOKIE_DOMAIN`` is set if it is detected through184 ``SERVER_NAME``. :pr:`2282`185- Auto-detect zero-argument app factory called ``create_app`` or186 ``make_app`` from ``FLASK_APP``. :pr:`2297`187- Factory functions are not required to take a ``script_info``188 parameter to work with the ``flask`` command. If they take a single189 parameter or a parameter named ``script_info``, the190 :class:`~cli.ScriptInfo` object will be passed. :pr:`2319`191- ``FLASK_APP`` can be set to an app factory, with arguments if192 needed, for example ``FLASK_APP=myproject.app:create_app('dev')``.193 :pr:`2326`194- ``FLASK_APP`` can point to local packages that are not installed in195 editable mode, although ``pip install -e`` is still preferred.196 :pr:`2414`197- The :class:`~views.View` class attribute198 :attr:`~views.View.provide_automatic_options` is set in199 :meth:`~views.View.as_view`, to be detected by200 :meth:`~Flask.add_url_rule`. :pr:`2316`201- Error handling will try handlers registered for ``blueprint, code``,202 ``app, code``, ``blueprint, exception``, ``app, exception``.203 :pr:`2314`204- ``Cookie`` is added to the response's ``Vary`` header if the session205 is accessed at all during the request (and not deleted). :pr:`2288`206- :meth:`~Flask.test_request_context` accepts ``subdomain`` and207 ``url_scheme`` arguments for use when building the base URL.208 :pr:`1621`209- Set :data:`APPLICATION_ROOT` to ``'/'`` by default. This was already210 the implicit default when it was set to ``None``.211- :data:`TRAP_BAD_REQUEST_ERRORS` is enabled by default in debug mode.212 ``BadRequestKeyError`` has a message with the bad key in debug mode213 instead of the generic bad request message. :pr:`2348`191 Chrome. :pr:�2282�192- Allow IP address as exact session cookie domain. :pr:�2282�193- ��SESSION_COOKIE_DOMAIN�� is set if it is detected through194 ��SERVER_NAME��. :pr:�2282�195- Auto-detect zero-argument app factory called ��create_app�� or196 ��make_app�� from ��FLASK_APP��. :pr:�2297�197- Factory functions are not required to take a ��script_info��198 parameter to work with the ��flask�� command. If they take a single199 parameter or a parameter named ��script_info��, the200 :class:�~cli.ScriptInfo� object will be passed. :pr:�2319�201- ��FLASK_APP�� can be set to an app factory, with arguments if202 needed, for example ��FLASK_APP=myproject.app:create_app(�dev�)��.203 :pr:�2326�204- ��FLASK_APP�� can point to local packages that are not installed in205 editable mode, although ��pip install -e�� is still preferred.206 :pr:�2414�207- The :class:�~views.View� class attribute208 :attr:�~views.View.provide_automatic_options� is set in209 :meth:�~views.View.as_view�, to be detected by210 :meth:�~Flask.add_url_rule�. :pr:�2316�211- Error handling will try handlers registered for ��blueprint, code��,212 ��app, code��, ��blueprint, exception��, ��app, exception��.213 :pr:�2314�214- ��Cookie�� is added to the response�s ��Vary�� header if the session215 is accessed at all during the request (and not deleted). :pr:�2288�216- :meth:�~Flask.test_request_context� accepts ��subdomain�� and217 ��url_scheme�� arguments for use when building the base URL.218 :pr:�1621�219- Set :data:�APPLICATION_ROOT� to ���/��� by default. This was already220 the implicit default when it was set to ��None��.221- :data:�TRAP_BAD_REQUEST_ERRORS� is enabled by default in debug mode.222 ��BadRequestKeyError�� has a message with the bad key in debug mode223 instead of the generic bad request message. :pr:�2348�224- Allow registering new tags with215 :class:`~json.tag.TaggedJSONSerializer` to support storing other216 types in the session cookie. :pr:`2352`225 :class:�~json.tag.TaggedJSONSerializer� to support storing other226 types in the session cookie. :pr:�2352�227- Only open the session if the request has not been pushed onto the218 context stack yet. This allows :func:`~stream_with_context`228 context stack yet. This allows :func:�~stream_with_context�229 generators to access the same session that the containing view uses.220 :pr:`2354`221- Add ``json`` keyword argument for the test client request methods.230 :pr:�2354�231- Add ��json�� keyword argument for the test client request methods.232 This will dump the given object as JSON and set the appropriate223 content type. :pr:`2358`233 content type. :pr:�2358�234- Extract JSON handling to a mixin applied to both the225 :class:`Request` and :class:`Response` classes. This adds the226 :meth:`~Response.is_json` and :meth:`~Response.get_json` methods to227 the response to make testing JSON response much easier. :pr:`2358`235 :class:�Request� and :class:�Response� classes. This adds the236 :meth:�~Response.is_json� and :meth:�~Response.get_json� methods to237 the response to make testing JSON response much easier. :pr:�2358�238- Removed error handler caching because it caused unexpected results239 for some exception inheritance hierarchies. Register handlers240 explicitly for each exception if you want to avoid traversing the231 MRO. :pr:`2362`232- Fix incorrect JSON encoding of aware, non-UTC datetimes. :pr:`2374`241 MRO. :pr:�2362�242- Fix incorrect JSON encoding of aware, non-UTC datetimes. :pr:�2374�243- Template auto reloading will honor debug mode even even if234 :attr:`~Flask.jinja_env` was already accessed. :pr:`2373`235- The following old deprecated code was removed. :issue:`2385`244 :attr:�~Flask.jinja_env� was already accessed. :pr:�2373�245- The following old deprecated code was removed. :issue:�2385�246237 - ``flask.ext`` - import extensions directly by their name instead238 of through the ``flask.ext`` namespace. For example,239 ``import flask.ext.sqlalchemy`` becomes240 ``import flask_sqlalchemy``.241 - ``Flask.init_jinja_globals`` - extend242 :meth:`Flask.create_jinja_environment` instead.243 - ``Flask.error_handlers`` - tracked by244 :attr:`Flask.error_handler_spec`, use :meth:`Flask.errorhandler`247 - ��flask.ext�� - import extensions directly by their name instead248 of through the ��flask.ext�� namespace. For example,249 ��import flask.ext.sqlalchemy�� becomes250 ��import flask_sqlalchemy��.251 - ��Flask.init_jinja_globals�� - extend252 :meth:�Flask.create_jinja_environment� instead.253 - ��Flask.error_handlers�� - tracked by254 :attr:�Flask.error_handler_spec�, use :meth:�Flask.errorhandler�255 to register handlers.246 - ``Flask.request_globals_class`` - use247 :attr:`Flask.app_ctx_globals_class` instead.248 - ``Flask.static_path`` - use :attr:`Flask.static_url_path`256 - ��Flask.request_globals_class�� - use257 :attr:�Flask.app_ctx_globals_class� instead.258 - ��Flask.static_path�� - use :attr:�Flask.static_url_path�259 instead.250 - ``Request.module`` - use :attr:`Request.blueprint` instead.260 - ��Request.module�� - use :attr:�Request.blueprint� instead.261252- The :attr:`Request.json` property is no longer deprecated.253 :issue:`1421`254- Support passing a :class:`~werkzeug.test.EnvironBuilder` or ``dict``255 to :meth:`test_client.open <werkzeug.test.Client.open>`. :pr:`2412`256- The ``flask`` command and :meth:`Flask.run` will load environment257 variables from ``.env`` and ``.flaskenv`` files if python-dotenv is258 installed. :pr:`2416`262- The :attr:�Request.json� property is no longer deprecated.263 :issue:�1421�264- Support passing a :class:�~werkzeug.test.EnvironBuilder� or ��dict��265 to :meth:�test_client.open <werkzeug.test.Client.open>�. :pr:�2412�266- The ��flask�� command and :meth:�Flask.run� will load environment267 variables from ��.env�� and ��.flaskenv�� files if python-dotenv is268 installed. :pr:�2416�269- When passing a full URL to the test client, the scheme in the URL is260 used instead of :data:`PREFERRED_URL_SCHEME`. :pr:`2430`261- :attr:`Flask.logger` has been simplified. ``LOGGER_NAME`` and262 ``LOGGER_HANDLER_POLICY`` config was removed. The logger is always263 named ``flask.app``. The level is only set on first access, it264 doesn't check :attr:`Flask.debug` each time. Only one format is265 used, not different ones depending on :attr:`Flask.debug`. No270 used instead of :data:�PREFERRED_URL_SCHEME�. :pr:�2430�271- :attr:�Flask.logger� has been simplified. ��LOGGER_NAME�� and272 ��LOGGER_HANDLER_POLICY�� config was removed. The logger is always273 named ��flask.app��. The level is only set on first access, it274 doesn�t check :attr:�Flask.debug� each time. Only one format is275 used, not different ones depending on :attr:�Flask.debug�. No276 handlers are removed, and a handler is only added if no handlers are267 already configured. :pr:`2436`268- Blueprint view function names may not contain dots. :pr:`2450`269- Fix a ``ValueError`` caused by invalid ``Range`` requests in some270 cases. :issue:`2526`271- The development server uses threads by default. :pr:`2529`272- Loading config files with ``silent=True`` will ignore273 :data:`~errno.ENOTDIR` errors. :pr:`2581`274- Pass ``--cert`` and ``--key`` options to ``flask run`` to run the275 development server over HTTPS. :pr:`2606`276- Added :data:`SESSION_COOKIE_SAMESITE` to control the ``SameSite``277 attribute on the session cookie. :pr:`2607`278- Added :meth:`~flask.Flask.test_cli_runner` to create a Click runner279 that can invoke Flask CLI commands for testing. :pr:`2636`277 already configured. :pr:�2436�278- Blueprint view function names may not contain dots. :pr:�2450�279- Fix a ��ValueError�� caused by invalid ��Range�� requests in some280 cases. :issue:�2526�281- The development server uses threads by default. :pr:�2529�282- Loading config files with ��silent=True�� will ignore283 :data:�~errno.ENOTDIR� errors. :pr:�2581�284- Pass ��--cert�� and ��--key�� options to ��flask run�� to run the285 development server over HTTPS. :pr:�2606�286- Added :data:�SESSION_COOKIE_SAMESITE� to control the ��SameSite��287 attribute on the session cookie. :pr:�2607�288- Added :meth:�~flask.Flask.test_cli_runner� to create a Click runner289 that can invoke Flask CLI commands for testing. :pr:�2636�290- Subdomain matching is disabled by default and setting281 :data:`SERVER_NAME` does not implicitly enable it. It can be enabled282 by passing ``subdomain_matching=True`` to the ``Flask`` constructor.283 :pr:`2635`291 :data:�SERVER_NAME� does not implicitly enable it. It can be enabled292 by passing ��subdomain_matching=True�� to the ��Flask�� constructor.293 :pr:�2635�294- A single trailing slash is stripped from the blueprint285 ``url_prefix`` when it is registered with the app. :pr:`2629`286- :meth:`Request.get_json` doesn't cache the result if parsing fails287 when ``silent`` is true. :issue:`2651`288- :func:`Request.get_json` no longer accepts arbitrary encodings.289 Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but290 Flask will autodetect UTF-8, -16, or -32. :pr:`2691`291- Added :data:`MAX_COOKIE_SIZE` and :attr:`Response.max_cookie_size`295 ��url_prefix�� when it is registered with the app. :pr:�2629�296- :meth:�Request.get_json� doesn�t cache the result if parsing fails297 when ��silent�� is true. :issue:�2651�298- :func:�Request.get_json� no longer accepts arbitrary encodings.299 Incoming JSON should be encoded using UTF-8 per :rfc:�8259�, but300 Flask will autodetect UTF-8, -16, or -32. :pr:�2691�301- Added :data:�MAX_COOKIE_SIZE� and :attr:�Response.max_cookie_size�302 to control when Werkzeug warns about large cookies that browsers may293 ignore. :pr:`2693`303 ignore. :pr:�2693�304- Updated documentation theme to make docs look better in small295 windows. :pr:`2709`305 windows. :pr:�2709�306- Rewrote the tutorial docs and example project to take a more307 structured approach to help new users avoid common pitfalls.298 :pr:`2676`308 :pr:�2676�309310311Version 0.12.4312--------------313314Released 2018-04-29315306- Repackage 0.12.3 to fix package layout issue. :issue:`2728`316- Repackage 0.12.3 to fix package layout issue. :issue:�2728�317318319Version 0.12.3320--------------321322Released 2018-04-26323314- :func:`Request.get_json` no longer accepts arbitrary encodings.315 Incoming JSON should be encoded using UTF-8 per :rfc:`8259`, but316 Flask will autodetect UTF-8, -16, or -32. :issue:`2692`317- Fix a Python warning about imports when using ``python -m flask``.318 :issue:`2666`319- Fix a ``ValueError`` caused by invalid ``Range`` requests in some324- :func:�Request.get_json� no longer accepts arbitrary encodings.325 Incoming JSON should be encoded using UTF-8 per :rfc:�8259�, but326 Flask will autodetect UTF-8, -16, or -32. :issue:�2692�327- Fix a Python warning about imports when using ��python -m flask��.328 :issue:�2666�329- Fix a ��ValueError�� caused by invalid ��Range�� requests in some330 cases.331332333Version 0.12.2334--------------335336Released 2017-05-16337328- Fix a bug in ``safe_join`` on Windows.338- Fix a bug in ��safe_join�� on Windows.339340341Version 0.12.1342--------------343344Released 2017-03-31345336- Prevent ``flask run`` from showing a ``NoAppException`` when an337 ``ImportError`` occurs within the imported application module.338- Fix encoding behavior of ``app.config.from_pyfile`` for Python 3.339 :issue:`2118`340- Use the ``SERVER_NAME`` config if it is present as default values341 for ``app.run``. :issue:`2109`, :pr:`2152`342- Call ``ctx.auto_pop`` with the exception object instead of ``None``,343 in the event that a ``BaseException`` such as ``KeyboardInterrupt``346- Prevent ��flask run�� from showing a ��NoAppException�� when an347 ��ImportError�� occurs within the imported application module.348- Fix encoding behavior of ��app.config.from_pyfile�� for Python 3.349 :issue:�2118�350- Use the ��SERVER_NAME�� config if it is present as default values351 for ��app.run��. :issue:�2109�, :pr:�2152�352- Call ��ctx.auto_pop�� with the exception object instead of ��None��,353 in the event that a ��BaseException�� such as ��KeyboardInterrupt��354 is raised in a request handler.355356357Version 0.12358------------359360Released 2016-12-21, codename Punsch361352- The cli command now responds to ``--version``.362- The cli command now responds to ��--version��.363- Mimetype guessing and ETag generation for file-like objects in354 ``send_file`` has been removed. :issue:`104`, :pr`1849`355- Mimetype guessing in ``send_file`` now fails loudly and doesn't fall356 back to ``application/octet-stream``. :pr:`1988`357- Make ``flask.safe_join`` able to join multiple paths like358 ``os.path.join`` :pr:`1730`364 ��send_file�� has been removed. :issue:�104�, :pr�1849�365- Mimetype guessing in ��send_file�� now fails loudly and doesn�t fall366 back to ��application/octet-stream��. :pr:�1988�367- Make ��flask.safe_join�� able to join multiple paths like368 ��os.path.join�� :pr:�1730�369- Revert a behavior change that made the dev server crash instead of360 returning an Internal Server Error. :pr:`2006`370 returning an Internal Server Error. :pr:�2006�371- Correctly invoke response handlers for both regular request372 dispatching as well as error handlers.373- Disable logger propagation by default for the app logger.364- Add support for range requests in ``send_file``.365- ``app.test_client`` includes preset default environment, which can366 now be directly set, instead of per ``client.get``.367- Fix crash when running under PyPy3. :pr:`1814`374- Add support for range requests in ��send_file��.375- ��app.test_client�� includes preset default environment, which can376 now be directly set, instead of per ��client.get��.377- Fix crash when running under PyPy3. :pr:�1814�378379380Version 0.11.1381--------------382383Released 2016-06-07384375- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from376 working. :pr:`1872`385- Fixed a bug that prevented ��FLASK_APP=foobar/__init__.py�� from386 working. :pr:�1872�387388389Version 0.11390------------391392Released 2016-05-29, codename Absinthe393394- Added support to serializing top-level arrays to385 :func:`flask.jsonify`. This introduces a security risk in ancient386 browsers. See :ref:`json-security` for details.395 :func:�flask.jsonify�. This introduces a security risk in ancient396 browsers. See :ref:�json-security� for details.397- Added before_render_template signal.388- Added ``**kwargs`` to :meth:`flask.Test.test_client` to support398- Added ��**kwargs�� to :meth:�flask.Test.test_client� to support399 passing additional keyword arguments to the constructor of390 :attr:`flask.Flask.test_client_class`.391- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the392 set-cookie behavior. If set to ``True`` a permanent session will be400 :attr:�flask.Flask.test_client_class�.401- Added ��SESSION_REFRESH_EACH_REQUEST�� config key that controls the402 set-cookie behavior. If set to ��True�� a permanent session will be403 refreshed each request and get their lifetime extended, if set to394 ``False`` it will only be modified if the session actually modifies.404 ��False�� it will only be modified if the session actually modifies.405 Non permanent sessions are not affected by this and will always406 expire if the browser window closes.407- Made Flask support custom JSON mimetypes for incoming data.398- Added support for returning tuples in the form ``(response,399 headers)`` from a view function.400- Added :meth:`flask.Config.from_json`.401- Added :attr:`flask.Flask.config_class`.402- Added :meth:`flask.Config.get_namespace`.408- Added support for returning tuples in the form ��(response,409 headers)�� from a view function.410- Added :meth:�flask.Config.from_json�.411- Added :attr:�flask.Flask.config_class�.412- Added :meth:�flask.Config.get_namespace�.413- Templates are no longer automatically reloaded outside of debug404 mode. This can be configured with the new ``TEMPLATES_AUTO_RELOAD``414 mode. This can be configured with the new ��TEMPLATES_AUTO_RELOAD��415 config key.406- Added a workaround for a limitation in Python 3.3's namespace416- Added a workaround for a limitation in Python 3.3�s namespace417 loader.408- Added support for explicit root paths when using Python 3.3's418- Added support for explicit root paths when using Python 3.3�s419 namespace packages.410- Added :command:`flask` and the ``flask.cli`` module to start the420- Added :command:�flask� and the ��flask.cli�� module to start the421 local debug server through the click CLI system. This is recommended412 over the old ``flask.run()`` method as it works faster and more422 over the old ��flask.run()�� method as it works faster and more423 reliable due to a different design and also replaces414 ``Flask-Script``.424 ��Flask-Script��.425- Error handlers that match specific classes are now checked first,426 thereby allowing catching exceptions that are subclasses of HTTP417 exceptions (in ``werkzeug.exceptions``). This makes it possible for427 exceptions (in ��werkzeug.exceptions��). This makes it possible for428 an extension author to create exceptions that will by default result429 in the HTTP error of their choosing, but may be caught with a custom430 error handler if desired.421- Added :meth:`flask.Config.from_mapping`.431- Added :meth:�flask.Config.from_mapping�.432- Flask will now log by default even if debug is disabled. The log433 format is now hardcoded but the default log handling can be disabled424 through the ``LOGGER_HANDLER_POLICY`` configuration key.434 through the ��LOGGER_HANDLER_POLICY�� configuration key.435- Removed deprecated module functionality.426- Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when436- Added the ��EXPLAIN_TEMPLATE_LOADING�� config flag which when437 enabled will instruct Flask to explain how it locates templates.438 This should help users debug when the wrong templates are loaded.439- Enforce blueprint handling in the order they were registered for440 template loading.441- Ported test suite to py.test.432- Deprecated ``request.json`` in favour of ``request.get_json()``.442- Deprecated ��request.json�� in favour of ��request.get_json()��.443- Add "pretty" and "compressed" separators definitions in jsonify()444 method. Reduces JSON response size when435 ``JSONIFY_PRETTYPRINT_REGULAR=False`` by removing unnecessary white445 ��JSONIFY_PRETTYPRINT_REGULAR=False�� by removing unnecessary white446 space included by default after separators.447- JSON responses are now terminated with a newline character, because448 it is a convention that UNIX text files end with a newline and some439 clients don't deal well when this newline is missing. This came up449 clients don�t deal well when this newline is missing. This came up450 originally as a part of441 https://github.com/postmanlabs/httpbin/issues/168. :pr:`1262`442- The automatically provided ``OPTIONS`` method is now correctly451 https://github.com/postmanlabs/httpbin/issues/168. :pr:�1262�452- The automatically provided ��OPTIONS�� method is now correctly453 disabled if the user registered an overriding rule with the444 lowercase-version ``options``. :issue:`1288`445- ``flask.json.jsonify`` now supports the ``datetime.date`` type.446 :pr:`1326`447- Don't leak exception info of already caught exceptions to context448 teardown handlers. :pr:`1393`449- Allow custom Jinja environment subclasses. :pr:`1422`454 lowercase-version ��options��. :issue:�1288�455- ��flask.json.jsonify�� now supports the ��datetime.date�� type.456 :pr:�1326�457- Don�t leak exception info of already caught exceptions to context458 teardown handlers. :pr:�1393�459- Allow custom Jinja environment subclasses. :pr:�1422�460- Updated extension dev guidelines.451- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.452- Turn on autoescape for ``flask.templating.render_template_string``453 by default. :pr:`1515`454- ``flask.ext`` is now deprecated. :pr:`1484`455- ``send_from_directory`` now raises BadRequest if the filename is456 invalid on the server OS. :pr:`1763`457- Added the ``JSONIFY_MIMETYPE`` configuration variable. :pr:`1728`461- ��flask.g�� now has ��pop()�� and ��setdefault�� methods.462- Turn on autoescape for ��flask.templating.render_template_string��463 by default. :pr:�1515�464- ��flask.ext�� is now deprecated. :pr:�1484�465- ��send_from_directory�� now raises BadRequest if the filename is466 invalid on the server OS. :pr:�1763�467- Added the ��JSONIFY_MIMETYPE�� configuration variable. :pr:�1728�468- Exceptions during teardown handling will no longer leave bad469 application contexts lingering around.460- Fixed broken ``test_appcontext_signals()`` test case.461- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package`470- Fixed broken ��test_appcontext_signals()�� test case.471- Raise an :exc:�AttributeError� in :func:�flask.helpers.find_package�472 with a useful message explaining why it is raised when a PEP 302463 import hook is used without an ``is_package()`` method.473 import hook is used without an ��is_package()�� method.474- Fixed an issue causing exceptions raised before entering a request475 or app context to be passed to teardown handlers.476- Fixed an issue with query parameters getting removed from requests477 in the test client when absolute URLs were requested.468- Made ``@before_first_request`` into a decorator as intended.478- Made ��@before_first_request�� into a decorator as intended.479- Fixed an etags bug when sending a file streams with a name.470- Fixed ``send_from_directory`` not expanding to the application root480- Fixed ��send_from_directory�� not expanding to the application root481 path correctly.482- Changed logic of before first request handlers to flip the flag483 after invoking. This will allow some uses that are potentially484 dangerous but should probably be permitted.485- Fixed Python 3 bug when a handler from476 ``app.url_build_error_handlers`` reraises the ``BuildError``.486 ��app.url_build_error_handlers�� reraises the ��BuildError��.487488489Version 0.10.1490--------------491492Released 2013-06-14493484- Fixed an issue where ``|tojson`` was not quoting single quotes which485 made the filter not work properly in HTML attributes. Now it's494- Fixed an issue where ��|tojson�� was not quoting single quotes which495 made the filter not work properly in HTML attributes. Now it�s496 possible to use that filter in single quoted attributes. This should497 make using that filter with angular.js easier.498- Added support for byte strings back to the session system. This499 broke compatibility with the common case of people putting binary
8 unmodified lines
508Released 2013-06-13, codename Limoncello509510- Changed default cookie serialization format from pickle to JSON to511 limit the impact an attacker can do if the secret key leaks. See502 :ref:`upgrading-to-010` for more information.503- Added ``template_test`` methods in addition to the already existing504 ``template_filter`` method family.505- Added ``template_global`` methods in addition to the already506 existing ``template_filter`` method family.512 :ref:�upgrading-to-010� for more information.513- Added ��template_test�� methods in addition to the already existing514 ��template_filter�� method family.515- Added ��template_global�� methods in addition to the already516 existing ��template_filter�� method family.517- Set the content-length header for x-sendfile.508- ``tojson`` filter now does not escape script blocks in HTML5518- ��tojson�� filter now does not escape script blocks in HTML5519 parsers.510- ``tojson`` used in templates is now safe by default due. This was520- ��tojson�� used in templates is now safe by default due. This was521 allowed due to the different escaping behavior.522- Flask will now raise an error if you attempt to register a new523 function on an already used endpoint.524- Added wrapper module around simplejson and added default525 serialization of datetime objects. This allows much easier526 customization of how JSON is handled by Flask or any Flask527 extension.518- Removed deprecated internal ``flask.session`` module alias. Use519 ``flask.sessions`` instead to get the session module. This is not to520 be confused with ``flask.session`` the session proxy.528- Removed deprecated internal ��flask.session�� module alias. Use529 ��flask.sessions�� instead to get the session module. This is not to530 be confused with ��flask.session�� the session proxy.531- Templates can now be rendered without request context. The behavior522 is slightly different as the ``request``, ``session`` and ``g``523 objects will not be available and blueprint's context processors are532 is slightly different as the ��request��, ��session�� and ��g��533 objects will not be available and blueprint�s context processors are534 not called.535- The config object is now available to the template as a real global536 and not through a context processor which makes it available even in537 imported templates by default.538- Added an option to generate non-ascii encoded JSON which should529 result in less bytes being transmitted over the network. It's539 result in less bytes being transmitted over the network. It�s540 disabled by default to not cause confusion with existing libraries531 that might expect ``flask.json.dumps`` to return bytestrings by541 that might expect ��flask.json.dumps�� to return bytestrings by542 default.533- ``flask.g`` is now stored on the app context instead of the request543- ��flask.g�� is now stored on the app context instead of the request544 context.535- ``flask.g`` now gained a ``get()`` method for not erroring out on545- ��flask.g�� now gained a ��get()�� method for not erroring out on546 non existing items.537- ``flask.g`` now can be used with the ``in`` operator to see what's547- ��flask.g�� now can be used with the ��in�� operator to see what�s548 defined and it now is iterable and will yield all attributes stored.539- ``flask.Flask.request_globals_class`` got renamed to540 ``flask.Flask.app_ctx_globals_class`` which is a better name to what549- ��flask.Flask.request_globals_class�� got renamed to550 ��flask.Flask.app_ctx_globals_class�� which is a better name to what551 it does since 0.10.542- ``request``, ``session`` and ``g`` are now also added as proxies to552- ��request��, ��session�� and ��g�� are now also added as proxies to553 the template context which makes them available in imported554 templates. One has to be very careful with those though because555 usage outside of macros might cause caching.556- Flask will no longer invoke the wrong error handlers if a proxy557 exception is passed through.548- Added a workaround for chrome's cookies in localhost not working as558- Added a workaround for chrome�s cookies in localhost not working as559 intended with domain names.560- Changed logic for picking defaults for cookie values from sessions561 to work better with Google Chrome.552- Added ``message_flashed`` signal that simplifies flashing testing.562- Added ��message_flashed�� signal that simplifies flashing testing.563- Added support for copying of request contexts for better working564 with greenlets.565- Removed custom JSON HTTP exception subclasses. If you were relying566 on them you can reintroduce them again yourself trivially. Using
5 unmodified lines
572 through the error handling process.573- Request context preservation in debug mode now keeps the exception574 information around which means that teardown handlers are able to575 distinguish error from success cases.566- Added the ``JSONIFY_PRETTYPRINT_REGULAR`` configuration variable.576- Added the ��JSONIFY_PRETTYPRINT_REGULAR�� configuration variable.577- Flask now orders JSON keys by default to not trash HTTP caches due578 to different hash seeds between different workers.569- Added ``appcontext_pushed`` and ``appcontext_popped`` signals.570- The builtin run method now takes the ``SERVER_NAME`` into account579- Added ��appcontext_pushed�� and ��appcontext_popped�� signals.580- The builtin run method now takes the ��SERVER_NAME�� into account581 when picking the default port to run on.572- Added ``flask.request.get_json()`` as a replacement for the old573 ``flask.request.json`` property.582- Added ��flask.request.get_json()�� as a replacement for the old583 ��flask.request.json�� property.584585586Version 0.9587-----------588589Released 2012-07-01, codename Campari590581- The :func:`flask.Request.on_json_loading_failed` now returns a JSON591- The :func:�flask.Request.on_json_loading_failed� now returns a JSON592 formatted response by default.583- The :func:`flask.url_for` function now can generate anchors to the593- The :func:�flask.url_for� function now can generate anchors to the594 generated links.585- The :func:`flask.url_for` function now can also explicitly generate595- The :func:�flask.url_for� function now can also explicitly generate596 URL rules specific to a given HTTP method.597- Logger now only returns the debug log setting if it was not set598 explicitly.599- Unregister a circular dependency between the WSGI environment and600 the request object when shutting down the request. This means that591 environ ``werkzeug.request`` will be ``None`` after the response was601 environ ��werkzeug.request�� will be ��None�� after the response was602 returned to the WSGI server but has the advantage that the garbage603 collector is not needed on CPython to tear down the request unless604 the user created circular dependencies themselves.605- Session is now stored after callbacks so that if the session payload606 is stored in the session you can still modify it in an after request607 callback.598- The :class:`flask.Flask` class will avoid importing the provided608- The :class:�flask.Flask� class will avoid importing the provided609 import name if it can (the required first parameter), to benefit610 tools which build Flask instances programmatically. The Flask class611 will fall back to using import on systems with custom module hooks,612 e.g. Google App Engine, or when the import name is inside a zip613 archive (usually a .egg) prior to Python 2.7.614- Blueprints now have a decorator to add custom template filters605 application wide, :meth:`flask.Blueprint.app_template_filter`.615 application wide, :meth:�flask.Blueprint.app_template_filter�.616- The Flask and Blueprint classes now have a non-decorator method for617 adding custom template filters application wide,608 :meth:`flask.Flask.add_template_filter` and609 :meth:`flask.Blueprint.add_app_template_filter`.610- The :func:`flask.get_flashed_messages` function now allows rendering618 :meth:�flask.Flask.add_template_filter� and619 :meth:�flask.Blueprint.add_app_template_filter�.620- The :func:�flask.get_flashed_messages� function now allows rendering621 flashed message categories in separate blocks, through a612 ``category_filter`` argument.613- The :meth:`flask.Flask.run` method now accepts ``None`` for ``host``614 and ``port`` arguments, using default values when ``None``. This622 ��category_filter�� argument.623- The :meth:�flask.Flask.run� method now accepts ��None�� for ��host��624 and ��port�� arguments, using default values when ��None��. This625 allows for calling run using configuration values, e.g.616 ``app.run(app.config.get('MYHOST'), app.config.get('MYPORT'))``,626 ��app.run(app.config.get(�MYHOST�), app.config.get(�MYPORT�))��,627 with proper behavior whether or not a config file is provided.618- The :meth:`flask.render_template` method now accepts a either an628- The :meth:�flask.render_template� method now accepts a either an629 iterable of template names or a single template name. Previously, it630 only accepted a single template name. On an iterable, the first631 template found is rendered.622- Added :meth:`flask.Flask.app_context` which works very similar to632- Added :meth:�flask.Flask.app_context� which works very similar to633 the request context but only provides access to the current634 application. This also adds support for URL generation without an635 active request context.636- View functions can now return a tuple with the first instance being627 an instance of :class:`flask.Response`. This allows for returning628 ``jsonify(error="error msg"), 400`` from a view function.629- :class:`~flask.Flask` and :class:`~flask.Blueprint` now provide a630 :meth:`~flask.Flask.get_send_file_max_age` hook for subclasses to637 an instance of :class:�flask.Response�. This allows for returning638 ��jsonify(error="error msg"), 400�� from a view function.639- :class:�~flask.Flask� and :class:�~flask.Blueprint� now provide a640 :meth:�~flask.Flask.get_send_file_max_age� hook for subclasses to641 override behavior of serving static files from Flask when using632 :meth:`flask.Flask.send_static_file` (used for the default static633 file handler) and :func:`~flask.helpers.send_file`. This hook is642 :meth:�flask.Flask.send_static_file� (used for the default static643 file handler) and :func:�~flask.helpers.send_file�. This hook is644 provided a filename, which for example allows changing cache635 controls by file extension. The default max-age for ``send_file``645 controls by file extension. The default max-age for ��send_file��646 and static files can be configured through a new637 ``SEND_FILE_MAX_AGE_DEFAULT`` configuration variable, which is used638 in the default ``get_send_file_max_age`` implementation.647 ��SEND_FILE_MAX_AGE_DEFAULT�� configuration variable, which is used648 in the default ��get_send_file_max_age�� implementation.649- Fixed an assumption in sessions implementation which could break650 message flashing on sessions implementations which use external651 storage.652- Changed the behavior of tuple return values from functions. They are653 no longer arguments to the response object, they now have a defined654 meaning.645- Added :attr:`flask.Flask.request_globals_class` to allow a specific646 class to be used on creation of the :data:`~flask.g` instance of655- Added :attr:�flask.Flask.request_globals_class� to allow a specific656 class to be used on creation of the :data:�~flask.g� instance of657 each request.648- Added ``required_methods`` attribute to view functions to force-add658- Added ��required_methods�� attribute to view functions to force-add659 methods on registration.650- Added :func:`flask.after_this_request`.651- Added :func:`flask.stream_with_context` and the ability to push660- Added :func:�flask.after_this_request�.661- Added :func:�flask.stream_with_context� and the ability to push662 contexts multiple times without producing unexpected behavior.663664665Version 0.8.1666-------------667668Released 2012-07-01669660- Fixed an issue with the undocumented ``flask.session`` module to not670- Fixed an issue with the undocumented ��flask.session�� module to not671 work properly on Python 2.5. It should not be used but did cause672 some problems for package managers.673674
17 unmodified lines
692 earlier feedback when users forget to import view code ahead of693 time.694- Added the ability to register callbacks that are only triggered once695 at the beginning of the first request.686 (:meth:`Flask.before_first_request`)696 (:meth:�Flask.before_first_request�)697- Malformed JSON data will now trigger a bad request HTTP exception698 instead of a value error which usually would result in a 500699 internal server error if not handled. This is a backwards700 incompatible change.701- Applications now not only have a root path where the resources and702 modules are located but also an instance path which is the703 designated place to drop files that are modified at runtime (uploads704 etc.). Also this is conceptually only instance depending and outside695 version control so it's the perfect place to put configuration files696 etc. For more information see :ref:`instance-folders`.697- Added the ``APPLICATION_ROOT`` configuration variable.698- Implemented :meth:`~flask.testing.TestClient.session_transaction` to705 version control so it�s the perfect place to put configuration files706 etc. For more information see :ref:�instance-folders�.707- Added the ��APPLICATION_ROOT�� configuration variable.708- Implemented :meth:�~flask.testing.TestClient.session_transaction� to709 easily modify sessions from the test environment.700- Refactored test client internally. The ``APPLICATION_ROOT``701 configuration variable as well as ``SERVER_NAME`` are now properly710- Refactored test client internally. The ��APPLICATION_ROOT��711 configuration variable as well as ��SERVER_NAME�� are now properly712 used by the test client as defaults.703- Added :attr:`flask.views.View.decorators` to support simpler713- Added :attr:�flask.views.View.decorators� to support simpler714 decorating of pluggable (class-based) views.715- Fixed an issue where the test client if used with the "with"716 statement did not trigger the execution of the teardown handlers.717- Added finer control over the session cookie parameters.718- HEAD requests to a method view now automatically dispatch to the709 ``get`` method if no handler was implemented.710- Implemented the virtual :mod:`flask.ext` package to import719 ��get�� method if no handler was implemented.720- Implemented the virtual :mod:�flask.ext� package to import721 extensions from.722- The context preservation on exceptions is now an integral component723 of Flask itself and no longer of the test client. This cleaned up724 some internal logic and lowers the odds of runaway request contexts725 in unittests.716- Fixed the Jinja2 environment's ``list_templates`` method not726- Fixed the Jinja2 environment�s ��list_templates�� method not727 returning the correct names when blueprints or modules were728 involved.729730
19 unmodified lines
750-----------751752Released 2011-06-28, codename Grappa753744- Added :meth:`~flask.Flask.make_default_options_response` which can745 be used by subclasses to alter the default behavior for ``OPTIONS``754- Added :meth:�~flask.Flask.make_default_options_response� which can755 be used by subclasses to alter the default behavior for ��OPTIONS��756 responses.747- Unbound locals now raise a proper :exc:`RuntimeError` instead of an748 :exc:`AttributeError`.757- Unbound locals now raise a proper :exc:�RuntimeError� instead of an758 :exc:�AttributeError�.759- Mimetype guessing and etag support based on file objects is now750 deprecated for :func:`flask.send_file` because it was unreliable.760 deprecated for :func:�flask.send_file� because it was unreliable.761 Pass filenames instead or attach your own etags and provide a proper762 mimetype by hand.763- Static file handling for modules now requires the name of the static764 folder to be supplied explicitly. The previous autodetection was not755 reliable and caused issues on Google's App Engine. Until 1.0 the old765 reliable and caused issues on Google�s App Engine. Until 1.0 the old766 behavior will continue to work but issue dependency warnings.767- Fixed a problem for Flask to run on jython.758- Added a ``PROPAGATE_EXCEPTIONS`` configuration variable that can be768- Added a ��PROPAGATE_EXCEPTIONS�� configuration variable that can be769 used to flip the setting of exception propagation which previously760 was linked to ``DEBUG`` alone and is now linked to either ``DEBUG``761 or ``TESTING``.770 was linked to ��DEBUG�� alone and is now linked to either ��DEBUG��771 or ��TESTING��.772- Flask no longer internally depends on rules being added through the763 ``add_url_rule`` function and can now also accept regular werkzeug773 ��add_url_rule�� function and can now also accept regular werkzeug774 rules added to the url map.765- Added an ``endpoint`` method to the flask application object which775- Added an ��endpoint�� method to the flask application object which776 allows one to register a callback to an arbitrary endpoint with a777 decorator.778- Use Last-Modified for static file sending instead of Date which was779 incorrectly introduced in 0.6.770- Added ``create_jinja_loader`` to override the loader creation780- Added ��create_jinja_loader�� to override the loader creation781 process.772- Implemented a silent flag for ``config.from_pyfile``.773- Added ``teardown_request`` decorator, for functions that should run782- Implemented a silent flag for ��config.from_pyfile��.783- Added ��teardown_request�� decorator, for functions that should run784 at the end of a request regardless of whether an exception occurred.775 Also the behavior for ``after_request`` was changed. It's now no785 Also the behavior for ��after_request�� was changed. It�s now no786 longer executed when an exception is raised. See777 :ref:`upgrading-to-new-teardown-handling`778- Implemented :func:`flask.has_request_context`779- Deprecated ``init_jinja_globals``. Override the780 :meth:`~flask.Flask.create_jinja_environment` method instead to787 :ref:�upgrading-to-new-teardown-handling�788- Implemented :func:�flask.has_request_context�789- Deprecated ��init_jinja_globals��. Override the790 :meth:�~flask.Flask.create_jinja_environment� method instead to791 achieve the same functionality.782- Added :func:`flask.safe_join`792- Added :func:�flask.safe_join�793- The automatic JSON request data unpacking now looks at the charset794 mimetype parameter.785- Don't modify the session on :func:`flask.get_flashed_messages` if795- Don�t modify the session on :func:�flask.get_flashed_messages� if796 there are no messages in the session.787- ``before_request`` handlers are now able to abort requests with797- ��before_request�� handlers are now able to abort requests with798 errors.799- It is not possible to define user exception handlers. That way you800 can provide custom error messages from a central hub for certain801 errors that might occur during request processing (for instance802 database connection errors, timeouts from remote resources etc.).803- Blueprints can provide blueprint specific error handlers.794- Implemented generic :ref:`views` (class-based views).804- Implemented generic :ref:�views� (class-based views).805806807Version 0.6.1808-------------809810Released 2010-12-31811802- Fixed an issue where the default ``OPTIONS`` response was not803 exposing all valid methods in the ``Allow`` header.812- Fixed an issue where the default ��OPTIONS�� response was not813 exposing all valid methods in the ��Allow�� header.814- Jinja2 template loading syntax now allows "./" in front of a815 template load path. Previously this caused issues with module816 setups.817- Fixed an issue where the subdomain setting for modules was ignored
11 unmodified lines
829830- After request functions are now called in reverse order of831 registration.832- OPTIONS is now automatically implemented by Flask unless the823 application explicitly adds 'OPTIONS' as method to the URL rule. In833 application explicitly adds �OPTIONS� as method to the URL rule. In834 this case no automatic OPTIONS handling kicks in.835- Static rules are now even in place if there is no static folder for836 the module. This was implemented to aid GAE which will remove the827 static folder if it's part of a mapping in the .yml file.828- The :attr:`~flask.Flask.config` is now available in the templates as829 ``config``.837 static folder if it�s part of a mapping in the .yml file.838- The :attr:�~flask.Flask.config� is now available in the templates as839 ��config��.840- Context processors will no longer override values passed directly to841 the render function.842- Added the ability to limit the incoming request data with the new833 ``MAX_CONTENT_LENGTH`` configuration value.834- The endpoint for the :meth:`flask.Module.add_url_rule` method is now843 ��MAX_CONTENT_LENGTH�� configuration value.844- The endpoint for the :meth:�flask.Module.add_url_rule� method is now845 optional to be consistent with the function of the same name on the846 application object.837- Added a :func:`flask.make_response` function that simplifies847- Added a :func:�flask.make_response� function that simplifies848 creating response object instances in views.849- Added signalling support based on blinker. This feature is currently850 optional and supposed to be used by extensions and applications. If841 you want to use it, make sure to have `blinker`_ installed.851 you want to use it, make sure to have �blinker�_ installed.852- Refactored the way URL adapters are created. This process is now843 fully customizable with the :meth:`~flask.Flask.create_url_adapter`853 fully customizable with the :meth:�~flask.Flask.create_url_adapter�854 method.855- Modules can now register for a subdomain instead of just an URL856 prefix. This makes it possible to bind a whole module to a857 configurable subdomain.
25 unmodified lines
883Released 2010-07-06, codename Calvados884885- Fixed a bug with subdomains that was caused by the inability to886 specify the server name. The server name can now be set with the877 ``SERVER_NAME`` config key. This key is now also used to set the887 ��SERVER_NAME�� config key. This key is now also used to set the888 session cookie cross-subdomain wide.889- Autoescaping is no longer active for all templates. Instead it is880 only active for ``.html``, ``.htm``, ``.xml`` and ``.xhtml``. Inside881 templates this behavior can be changed with the ``autoescape`` tag.890 only active for ��.html��, ��.htm��, ��.xml�� and ��.xhtml��. Inside891 templates this behavior can be changed with the ��autoescape�� tag.892- Refactored Flask internally. It now consists of more than a single893 file.884- :func:`flask.send_file` now emits etags and has the ability to do894- :func:�flask.send_file� now emits etags and has the ability to do895 conditional responses builtin.896- (temporarily) dropped support for zipped applications. This was a897 rarely used feature and led to some confusing behavior.898- Added support for per-package template and static-file directories.889- Removed support for ``create_jinja_loader`` which is no longer used899- Removed support for ��create_jinja_loader�� which is no longer used900 in 0.5 due to the improved module support.901- Added a helper function to expose files from any directory.902903
3 unmodified lines
907Released 2010-06-18, codename Rakia908909- Added the ability to register application wide error handlers from910 modules.901- :meth:`~flask.Flask.after_request` handlers are now also invoked if911- :meth:�~flask.Flask.after_request� handlers are now also invoked if912 the request dies with an exception and an error handling page kicks913 in.914- Test client has not the ability to preserve the request context for915 a little longer. This can also be used to trigger custom requests916 that do not pop the request stack for testing.917- Because the Python standard library caches loggers, the name of the918 logger is configurable now to better support unittests.909- Added ``TESTING`` switch that can activate unittesting helpers.910- The logger switches to ``DEBUG`` mode now if debug is enabled.919- Added ��TESTING�� switch that can activate unittesting helpers.920- The logger switches to ��DEBUG�� mode now if debug is enabled.921922923Version 0.3.1924-------------925926Released 2010-05-28927918- Fixed a error reporting bug with :meth:`flask.Config.from_envvar`928- Fixed a error reporting bug with :meth:�flask.Config.from_envvar�929- Removed some unused code from flask930- Release does no longer include development leftover files (.git931 folder for themes, built documentation in zip and pdf file and some932 .pyc files)
4 unmodified lines
937938Released 2010-05-28, codename Schnaps939940- Added support for categories for flashed messages.931- The application now configures a :class:`logging.Handler` and will941- The application now configures a :class:�logging.Handler� and will942 log request handling exceptions to that logger when not in debug943 mode. This makes it possible to receive mails on server errors for944 example.945- Added support for context binding that does not require the use of
5 unmodified lines
951952Version 0.2953-----------954945Released 2010-05-12, codename Jägermeister955Released 2010-05-12, codename J?germeister956957- Various bugfixes958- Integrated JSON support949- Added :func:`~flask.get_template_attribute` helper function.950- :meth:`~flask.Flask.add_url_rule` can now also register a view959- Added :func:�~flask.get_template_attribute� helper function.960- :meth:�~flask.Flask.add_url_rule� can now also register a view961 function.962- Refactored internal request dispatching.963- Server listens on 127.0.0.1 by default now to fix issues with964 chrome.965- Added external URL support.956- Added support for :func:`~flask.send_file`966- Added support for :func:�~flask.send_file�967- Module support and internal request handling refactoring to better968 support pluggable applications.969- Sessions can be set to be permanent now on a per-session basis.970- Better error reporting on missing secret keys.
9 unmodified lines