From 284f09cdb8b463beb26321fad721779bfdf18844 Mon Sep 17 00:00:00 2001 From: Suzan-Tulinde <59966248+Agaba-Ed@users.noreply.github.com> Date: Fri, 1 Apr 2022 13:53:07 +0300 Subject: [PATCH] Defined constants to reduce duplication "localtoc.html" and "ethicalads.html" were repeated 3 times. Defined constants to reduce code duplication. --- CHANGES.rst | 9 +++++++++ docs/conf.py | 11 ++++++++--- setup.py | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 07e69240..b0a3a0ae 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,15 @@ Version 2.2.0 Unreleased +Version 2.1.1 +------------- + +Released on 2022-03-30 + +- Set the minimum required version of importlib_metadata to 3.6.0, + which is required on Python < 3.10. :issue:`4502` + + Version 2.1.0 ------------- diff --git a/docs/conf.py b/docs/conf.py index ae2922d7..4cf15107 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,11 @@ import packaging.version from pallets_sphinx_themes import get_version from pallets_sphinx_themes import ProjectLink +# Constants ------------------------------------------------------------ +ETHICALADS_PATH="ethicalads.html" +LOCALTOC_PATH="localtoc.html" + + # Project -------------------------------------------------------------- project = "Flask" @@ -49,10 +54,10 @@ html_context = { ] } html_sidebars = { - "index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"], - "**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"], + "index": ["project.html", LOCALTOC_PATH, "searchbox.html", ETHICALADS_PATH], + "**": [LOCALTOC_PATH, "relations.html", "searchbox.html", ETHICALADS_PATH], } -singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]} +singlehtml_sidebars = {"index": ["project.html", LOCALTOC_PATH, ETHICALADS_PATH]} html_static_path = ["_static"] html_favicon = "_static/flask-icon.png" html_logo = "_static/flask-icon.png" diff --git a/setup.py b/setup.py index 196f1c10..a28763b5 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( "Jinja2 >= 3.0", "itsdangerous >= 2.0", "click >= 8.0", - "importlib-metadata; python_version < '3.10'", + "importlib-metadata >= 3.6.0; python_version < '3.10'", ], extras_require={ "async": ["asgiref >= 3.2"],