diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index edfdf55d..ef277f00 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,7 +33,7 @@ jobs: id-token: write contents: write # Can't pin with hash due to how this workflow works. - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0 + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0 with: base64-subjects: ${{ needs.build.outputs.hash }} create-release: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d31dc110..73a32f29 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: pip install -U setuptools python -m pip install -U pip - name: cache mypy - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 with: path: ./.mypy_cache key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d980c04f..c6e44786 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - flake8-bugbear - flake8-implicit-str-concat - repo: https://github.com/peterdemin/pip-compile-multi - rev: v2.6.1 + rev: v2.6.2 hooks: - id: pip-compile-multi-verify - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/CHANGES.rst b/CHANGES.rst index 94c16a34..40f6c78c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,19 +3,56 @@ Version 2.3.0 Unreleased +- Remove previously deprecated code. :pr:`4995` + + - The ``push`` and ``pop`` methods of the deprecated ``_app_ctx_stack`` and + ``_request_ctx_stack`` objects are removed. ``top`` still exists to give + extensions more time to update, but it will be removed. + - The ``FLASK_ENV`` environment variable, ``ENV`` config key, and ``app.env`` + property are removed. + - The ``session_cookie_name``, ``send_file_max_age_default``, ``use_x_sendfile``, + ``propagate_exceptions``, and ``templates_auto_reload`` properties on ``app`` + are removed. + - The ``JSON_AS_ASCII``, ``JSON_SORT_KEYS``, ``JSONIFY_MIMETYPE``, and + ``JSONIFY_PRETTYPRINT_REGULAR`` config keys are removed. + - The ``app.before_first_request`` and ``bp.before_app_first_request`` decorators + are removed. + - ``json_encoder`` and ``json_decoder`` attributes on app and blueprint, and the + corresponding ``json.JSONEncoder`` and ``JSONDecoder`` classes, are removed. + - The ``json.htmlsafe_dumps`` and ``htmlsafe_dump`` functions are removed. + - Calling setup methods on blueprints after registration is an error instead of a + warning. :pr:`4997` + +- Importing ``escape`` and ``Markup`` from ``flask`` is deprecated. Import them + directly from ``markupsafe`` instead. :pr:`4996` +- The ``app.got_first_request`` property is deprecated. :pr:`4997` +- The ``locked_cached_property`` decorator is deprecated. Use a lock inside the + decorated function if locking is needed. :issue:`4993` +- Remove uses of locks that could cause requests to block each other very briefly. + :issue:`4993` - Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``. :pr:`4947` - Ensure subdomains are applied with nested blueprints. :issue:`4834` +- ``config.from_file`` can use ``text=False`` to indicate that the parser wants a + binary file instead. :issue:`4989` +- If a blueprint is created with an empty name it raises a ``ValueError``. + :issue:`5010` + + +Version 2.2.4 +------------- + +Unreleased + +- Update for compatibility with Werkzeug 2.3. Version 2.2.3 ------------- -Unreleased +Released 2023-02-15 -- Autoescaping is now enabled by default for ``.svg`` files. Inside - templates this behavior can be changed with the ``autoescape`` tag. - :issue:`4831` +- Autoescape is enabled by default for ``.svg`` template files. :issue:`4831` - Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892` - Add ``--debug`` option to the ``flask run`` command. :issue:`4777` diff --git a/docs/api.rst b/docs/api.rst index afbe0b79..8729f6cd 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -217,10 +217,6 @@ Useful Functions and Classes .. autofunction:: send_from_directory -.. autofunction:: escape - -.. autoclass:: Markup - :members: escape, unescape, striptags Message Flashing ---------------- @@ -270,12 +266,6 @@ HTML ``