Deprecate flask.ext

* Add deprecation warning to ext pkg

* Add docs on deprecation of flask.ext

* Improve deprecation warnings

* Add headers for better distinction, fix ordering issue of paragraphs
This commit is contained in:
Markus Unterwaditzer 2016-04-02 21:06:30 +02:00
parent cc536c8a7b
commit d3d8a4694a
4 changed files with 65 additions and 22 deletions

View file

@ -24,11 +24,17 @@ installation, make sure to pass it the :option:`-U` parameter::
Version 1.0
-----------
Debugging
+++++++++
Flask 1.0 removed the ``debug_log_format`` attribute from Flask
applications. Instead the new ``LOGGER_HANDLER_POLICY`` configuration can
be used to disable the default log handlers and custom log handlers can be
set up.
Error handling
++++++++++++++
The behavior of error handlers was changed.
The precedence of handlers used to be based on the decoration/call order of
:meth:`~flask.Flask.errorhandler` and
@ -37,9 +43,7 @@ Now the inheritance hierarchy takes precedence and handlers for more
specific exception classes are executed instead of more general ones.
See :ref:`error-handlers` for specifics.
The :func:`~flask.templating.render_template_string` function has changed to
autoescape template variables by default. This better matches the behavior
of :func:`~flask.templating.render_template`.
Trying to register a handler on an instance now raises :exc:`ValueError`.
.. note::
@ -47,8 +51,25 @@ of :func:`~flask.templating.render_template`.
only for exception *instances*. This was unintended and plain wrong,
and therefore was replaced with the intended behavior of registering
handlers only using exception classes and HTTP error codes.
Templating
++++++++++
The :func:`~flask.templating.render_template_string` function has changed to
autoescape template variables by default. This better matches the behavior
of :func:`~flask.templating.render_template`.
Trying to register a handler on an instance now raises :exc:`ValueError`.
Extension imports
+++++++++++++++++
Extension imports of the form ``flask.ext.foo`` are deprecated, you should use
``flask_foo``.
The old form still works, but Flask will issue a
``flask.exthook.ExtDeprecationWarning`` for each extension you import the old
way. We also provide a migration utility called `flask-ext-migrate
<https://github.com/pocoo/flask-ext-migrate>`_ that is supposed to
automatically rewrite your imports for this.
.. _upgrading-to-010: