pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/py-flask py-flask: updated to 2.2.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6ac391d58005
branches:  trunk
changeset: 382791:6ac391d58005
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Aug 05 11:46:37 2022 +0000

description:
py-flask: updated to 2.2.1

Version 2.2.1
-------------
-   Setting or accessing ``json_encoder`` or ``json_decoder`` raises a
    deprecation warning.


Version 2.2.0
-------------
-   Remove previously deprecated code.

    -   Old names for some ``send_file`` parameters have been removed.
        ``download_name`` replaces ``attachment_filename``, ``max_age``
        replaces ``cache_timeout``, and ``etag`` replaces ``add_etags``.
        Additionally, ``path`` replaces ``filename`` in
        ``send_from_directory``.
    -   The ``RequestContext.g`` property returning ``AppContext.g`` is
        removed.

-   Update Werkzeug dependency to >= 2.2.
-   The app and request contexts are managed using Python context vars
    directly rather than Werkzeug's ``LocalStack``. This should result
    in better performance and memory use.

    -   Extension maintainers, be aware that ``_app_ctx_stack.top``
        and ``_request_ctx_stack.top`` are deprecated. Store data on
        ``g`` instead using a unique prefix, like
        ``g._extension_name_attr``.

-   The ``FLASK_ENV`` environment variable and ``app.env`` attribute are
    deprecated, removing the distinction between development and debug
    mode. Debug mode should be controlled directly using the ``--debug``
    option or ``app.run(debug=True)``.
-   Some attributes that proxied config keys on ``app`` are deprecated:
    ``session_cookie_name``, ``send_file_max_age_default``,
    ``use_x_sendfile``, ``propagate_exceptions``, and
    ``templates_auto_reload``. Use the relevant config keys instead.

-   Add new customization points to the ``Flask`` app object for many
    previously global behaviors.

    -   ``flask.url_for`` will call ``app.url_for``.
    -   ``flask.abort`` will call ``app.aborter``.
        ``Flask.aborter_class`` and ``Flask.make_aborter`` can be used
        to customize this aborter.
    -   ``flask.redirect`` will call ``app.redirect``.
    -   ``flask.json`` is an instance of ``JSONProvider``. A different
        provider can be set to use a different JSON library.
        ``flask.jsonify`` will call ``app.json.response``, other
        functions in ``flask.json`` will call corresponding functions in
        ``app.json``.

-   JSON configuration is moved to attributes on the default
    ``app.json`` provider. ``JSON_AS_ASCII``, ``JSON_SORT_KEYS``,
    ``JSONIFY_MIMETYPE``, and ``JSONIFY_PRETTYPRINT_REGULAR`` are
    deprecated.
-   Setting custom ``json_encoder`` and ``json_decoder`` classes on the
    app or a blueprint, and the corresponding ``json.JSONEncoder`` and
    ``JSONDecoder`` classes, are deprecated. JSON behavior can now be
    overridden using the ``app.json`` provider interface.
-   ``json.htmlsafe_dumps`` and ``json.htmlsafe_dump`` are deprecated,
    the function is built-in to Jinja now.
-   Refactor ``register_error_handler`` to consolidate error checking.
    Rewrite some error messages to be more consistent.
-   Use Blueprint decorators and functions intended for setup after
    registering the blueprint will show a warning. In the next version,
    this will become an error just like the application setup methods.

-   ``before_first_request`` is deprecated. Run setup code when creating
    the application instead.
-   Added the ``View.init_every_request`` class attribute. If a view
    subclass sets this to ``False``, the view will not create a new
    instance on every request.
-   A ``flask.cli.FlaskGroup`` Click group can be nested as a
    sub-command in a custom CLI.
-   Add ``--app`` and ``--debug`` options to the ``flask`` CLI, instead
    of requiring that they are set through environment variables.

-   Add ``--env-file`` option to the ``flask`` CLI. This allows
    specifying a dotenv file to load in addition to ``.env`` and
    ``.flaskenv``.
-   It is no longer required to decorate custom CLI commands on
    ``app.cli`` or ``blueprint.cli`` with ``@with_appcontext``, an app
    context will already be active at that point.
-   ``SessionInterface.get_expiration_time`` uses a timezone-aware
    value.
-   View functions can return generators directly instead of wrapping
    them in a ``Response``.
-   Add ``stream_template`` and ``stream_template_string`` functions to
    render a template as a stream of pieces.
-   A new implementation of context preservation during debugging and
    testing.

    -   ``request``, ``g``, and other context-locals point to the
        correct data when running code in the interactive debugger
        console.
    -   Teardown functions are always run at the end of the request,
        even if the context is preserved. They are also run after the
        preserved context is popped.
    -   ``stream_with_context`` preserves context separately from a
        ``with client`` block. It will be cleaned up when
        ``response.get_data()`` or ``response.close()`` is called.

-   Allow returning a list from a view function, to convert it to a
    JSON response like a dict is.
-   When type checking, allow ``TypedDict`` to be returned from view
    functions.
-   Remove the ``--eager-loading/--lazy-loading`` options from the
    ``flask run`` command. The app is always eager loaded the first
    time, then lazily loaded in the reloader. The reloader always prints
    errors immediately but continues serving. Remove the internal
    ``DispatchingApp`` middleware used by the previous implementation.

diffstat:

 www/py-flask/Makefile |  6 +++---
 www/py-flask/PLIST    |  5 ++++-
 www/py-flask/distinfo |  8 ++++----
 3 files changed, 11 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 7f6f264fb5d9 -r 6ac391d58005 www/py-flask/Makefile
--- a/www/py-flask/Makefile     Fri Aug 05 11:44:30 2022 +0000
+++ b/www/py-flask/Makefile     Fri Aug 05 11:46:37 2022 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.24 2022/07/18 19:09:23 adam Exp $
+# $NetBSD: Makefile,v 1.25 2022/08/05 11:46:37 adam Exp $
 
-DISTNAME=      Flask-2.1.3
+DISTNAME=      Flask-2.2.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:tl}
 CATEGORIES=    www python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=F/Flask/}
@@ -13,7 +13,7 @@
 DEPENDS+=      ${PYPKGPREFIX}-itsdangerous>=2.0:../../security/py-itsdangerous
 DEPENDS+=      ${PYPKGPREFIX}-click>=8.0:../../devel/py-click
 DEPENDS+=      ${PYPKGPREFIX}-jinja2>=3.0:../../textproc/py-jinja2
-DEPENDS+=      ${PYPKGPREFIX}-werkzeug>=2.0:../../www/py-werkzeug
+DEPENDS+=      ${PYPKGPREFIX}-werkzeug>=2.2.0:../../www/py-werkzeug
 TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27
diff -r 7f6f264fb5d9 -r 6ac391d58005 www/py-flask/PLIST
--- a/www/py-flask/PLIST        Fri Aug 05 11:44:30 2022 +0000
+++ b/www/py-flask/PLIST        Fri Aug 05 11:46:37 2022 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2022/04/29 13:41:38 wiz Exp $
+@comment $NetBSD: PLIST,v 1.8 2022/08/05 11:46:37 adam Exp $
 bin/flask-${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -39,6 +39,9 @@
 ${PYSITELIB}/flask/json/__init__.py
 ${PYSITELIB}/flask/json/__init__.pyc
 ${PYSITELIB}/flask/json/__init__.pyo
+${PYSITELIB}/flask/json/provider.py
+${PYSITELIB}/flask/json/provider.pyc
+${PYSITELIB}/flask/json/provider.pyo
 ${PYSITELIB}/flask/json/tag.py
 ${PYSITELIB}/flask/json/tag.pyc
 ${PYSITELIB}/flask/json/tag.pyo
diff -r 7f6f264fb5d9 -r 6ac391d58005 www/py-flask/distinfo
--- a/www/py-flask/distinfo     Fri Aug 05 11:44:30 2022 +0000
+++ b/www/py-flask/distinfo     Fri Aug 05 11:46:37 2022 +0000
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.14 2022/07/18 19:09:23 adam Exp $
+$NetBSD: distinfo,v 1.15 2022/08/05 11:46:37 adam Exp $
 
-BLAKE2s (Flask-2.1.3.tar.gz) = 2c72673d40bf9adfd508a9605a5ab4e93f1fb4cf18d2f0289136633c4c0c3061
-SHA512 (Flask-2.1.3.tar.gz) = 6289bcaa295265c501fda1292b496911768525acf4155c856e14479a213aec4ca50a45ddd81b30ccd31fd684da1942ec10400f2dc8280ceff6ded9baf55494e5
-Size (Flask-2.1.3.tar.gz) = 630206 bytes
+BLAKE2s (Flask-2.2.1.tar.gz) = 9f5bc515f77988c875066fc56b38f79986216bd567de2b2b5eb40d3472d2b242
+SHA512 (Flask-2.2.1.tar.gz) = 845857cd6441e935a5274f362708c1e84654f757b0412bb57dd1235943d1d0562b081b53e77920ab9891bbe6810a06f7564e828cda472844413f7a1249335d1a
+Size (Flask-2.2.1.tar.gz) = 687433 bytes



Home | Main Index | Thread Index | Old Index