From 6650764e9719402de2aaa6f321bdec587699c6b2 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 23 Feb 2023 08:35:16 -0800 Subject: [PATCH] remove previously deprecated code --- CHANGES.rst | 18 ++ docs/api.rst | 6 - docs/config.rst | 69 +------- src/flask/__init__.py | 4 +- src/flask/app.py | 340 +------------------------------------ src/flask/blueprints.py | 106 +----------- src/flask/globals.py | 29 +--- src/flask/helpers.py | 35 +--- src/flask/json/__init__.py | 220 +++--------------------- src/flask/json/provider.py | 104 +----------- src/flask/scaffold.py | 15 -- tests/conftest.py | 1 - tests/test_async.py | 9 - tests/test_basic.py | 39 ----- tests/test_blueprints.py | 10 +- tests/test_helpers.py | 22 +-- 16 files changed, 81 insertions(+), 946 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0b8d2cfd..64d5770c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,24 @@ 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. + - Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``. :pr:`4947` - Ensure subdomains are applied with nested blueprints. :issue:`4834` diff --git a/docs/api.rst b/docs/api.rst index afbe0b79..bf37700f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -270,12 +270,6 @@ HTML ``