From 1ce9a2f3a1ca8048f42e1331bcaf1b099e986790 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Mon, 20 Jan 2025 17:42:57 +0000 Subject: [PATCH] [stable 2.15] remove the relaxed reqs (#2364) * rm relaxed reqs and base constraints * move pins and requirements out of relaxed * sync requirements lock file * update noxfile to rm relaxed reqs * update docs * remove tagger session * Update tests/constraints.in Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- .../community/documentation_contributions.rst | 1 - noxfile.py | 37 ++-- tests/constraints-base.in | 4 - tests/constraints.in | 9 +- tests/requirements-relaxed.in | 14 -- tests/requirements-relaxed.txt | 163 ------------------ tests/requirements.in | 16 +- tests/requirements.txt | 36 ++-- 8 files changed, 56 insertions(+), 224 deletions(-) delete mode 100644 tests/constraints-base.in delete mode 100644 tests/requirements-relaxed.in delete mode 100644 tests/requirements-relaxed.txt diff --git a/docs/docsite/rst/community/documentation_contributions.rst b/docs/docsite/rst/community/documentation_contributions.rst index 540c4753e32..befbf82280c 100644 --- a/docs/docsite/rst/community/documentation_contributions.rst +++ b/docs/docsite/rst/community/documentation_contributions.rst @@ -113,7 +113,6 @@ For more information on minimum Python versions, see the :ref:`support matrix None: session.run("python", "docs/bin/clone-core.py", "--check") -def _relaxed_parser(session: nox.Session) -> ArgumentParser: - """ - Generate an argument parser with a --relaxed option. - """ - parser = ArgumentParser(prog=f"nox -e {session.name} --") - parser.add_argument( - "--relaxed", - default=False, - action=BooleanOptionalAction, - help="Whether to use requirements-relaxed file. (Default: %(default)s)", - ) - return parser - - def _env_python(session: nox.Session) -> str: """ Get the full path to an environment's python executable @@ -193,9 +178,8 @@ def checkers(session: nox.Session, test: str): """ Run docs build checkers """ - args = _relaxed_parser(session).parse_args(session.posargs) - install(session, req="requirements-relaxed" if args.relaxed else "requirements") + install(session, req="requirements") _clone_core_check(session) session.run("make", "-C", "docs/docsite", "clean", external=True) session.run("python", "tests/checkers.py", test) @@ -206,16 +190,15 @@ def make(session: nox.Session): """ Generate HTML from documentation source using the Makefile """ - parser = _relaxed_parser(session) - parser.add_argument( - "make_args", nargs="*", help="Specify make targets as arguments" - ) - args = parser.parse_args(session.posargs) + make_args = session.posargs or ["clean", "coredocs"] - install(session, req="requirements-relaxed" if args.relaxed else "requirements") + install(session, req="requirements") _clone_core_check(session) - make_args: list[str] = [ + session.run( + "make", + "-C", + "docs/docsite", f"PYTHON={_env_python(session)}", - *(args.make_args or ("clean", "coredocs")), - ] - session.run("make", "-C", "docs/docsite", *make_args, external=True) + *make_args, + external=True, + ) diff --git a/tests/constraints-base.in b/tests/constraints-base.in deleted file mode 100644 index 7a92b3815df..00000000000 --- a/tests/constraints-base.in +++ /dev/null @@ -1,4 +0,0 @@ -# Known limitations for indirect/transitive dependencies. - -rstcheck < 6 # rstcheck 6.x has problem with rstcheck.core triggered by include files w/ sphinx directives https://github.com/rstcheck/rstcheck-core/issues/3 -sphinx < 7.2.0 # https://github.com/readthedocs/sphinx-notfound-page/issues/219 diff --git a/tests/constraints.in b/tests/constraints.in index 543efd43b9e..fe9ab4eeaee 100644 --- a/tests/constraints.in +++ b/tests/constraints.in @@ -1,5 +1,12 @@ # This constraints file contains pins for the stable, tested versions of sphinx # and antsibull-docs that production builds rely upon. +# This constraint file also pins other versions for which there are known limitations. -sphinx == 5.3.0 +sphinx == 5.3.0 # https://github.com/readthedocs/sphinx-notfound-page/issues/219 antsibull-docs == 2.7.0 # currently approved version + +rstcheck < 6 # rstcheck 6.x has problem with rstcheck.core triggered by include files w/ sphinx directives https://github.com/rstcheck/rstcheck-core/issues/3 +jinja2 >= 3.0.0 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt +pyyaml >= 5.1 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt +importlib_resources >= 5.0, < 5.1; python_version < '3.10' # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt +resolvelib >= 0.5.3, < 1.1.0 # https://github.com/ansible/ansible/blob/stable-2.15/requirements.txt diff --git a/tests/requirements-relaxed.in b/tests/requirements-relaxed.in deleted file mode 100644 index efc542c66cc..00000000000 --- a/tests/requirements-relaxed.in +++ /dev/null @@ -1,14 +0,0 @@ -# This requirements file contains no pins on antsibull-docs and other -# essential tools -# It's used for testing purposes and devel branch builds on docs.ansible.com. - --c constraints-base.in - -jinja2 >= 3.0.0 # used by hacking/build_library/build_ansible/command_plugins/generate_man.py and dump_keywords.py -pyyaml >= 5.1 # used by ansible-core -resolvelib >= 0.5.3, < 1.1.0 # used by ansible-core -sphinx -sphinx-notfound-page -sphinx-ansible-theme -rstcheck -antsibull-docs ~= 2.0 diff --git a/tests/requirements-relaxed.txt b/tests/requirements-relaxed.txt deleted file mode 100644 index e5bd680792a..00000000000 --- a/tests/requirements-relaxed.txt +++ /dev/null @@ -1,163 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# pip-compile --allow-unsafe --output-file=tests/requirements-relaxed.txt --strip-extras tests/requirements-relaxed.in -# -aiofiles==23.2.1 - # via antsibull-core -aiohappyeyeballs==2.4.0 - # via aiohttp -aiohttp==3.10.5 - # via - # antsibull-core - # antsibull-docs -aiosignal==1.3.1 - # via aiohttp -alabaster==0.7.13 - # via sphinx -ansible-pygments==0.1.1 - # via - # antsibull-docs - # sphinx-ansible-theme -antsibull-core==2.1.0 - # via antsibull-docs -antsibull-docs==2.7.0 - # via -r tests/requirements-relaxed.in -antsibull-docs-parser==1.0.0 - # via antsibull-docs -async-timeout==4.0.3 - # via aiohttp -asyncio-pool==0.6.0 - # via antsibull-docs -attrs==23.1.0 - # via aiohttp -babel==2.12.1 - # via sphinx -build==1.0.3 - # via antsibull-core -certifi==2023.7.22 - # via requests -charset-normalizer==3.2.0 - # via requests -docutils==0.18.1 - # via - # antsibull-docs - # rstcheck - # sphinx - # sphinx-rtd-theme -frozenlist==1.4.0 - # via - # aiohttp - # aiosignal -idna==3.4 - # via - # requests - # yarl -imagesize==1.4.1 - # via sphinx -jinja2==3.1.2 - # via - # -r tests/requirements-relaxed.in - # antsibull-docs - # sphinx -markupsafe==2.1.3 - # via jinja2 -multidict==6.0.5 - # via - # aiohttp - # yarl -packaging==23.1 - # via - # antsibull-core - # antsibull-docs - # build - # sphinx -perky==0.9.2 - # via antsibull-core -pydantic==1.10.17 - # via - # antsibull-core - # antsibull-docs -pygments==2.16.1 - # via - # ansible-pygments - # sphinx -pyproject-hooks==1.0.0 - # via build -pyyaml==6.0.1 - # via - # -r tests/requirements-relaxed.in - # antsibull-core - # antsibull-docs -requests==2.31.0 - # via sphinx -resolvelib==1.0.1 - # via -r tests/requirements-relaxed.in -rstcheck==5.0.0 - # via - # -c tests/constraints-base.in - # -r tests/requirements-relaxed.in - # antsibull-docs -semantic-version==2.10.0 - # via - # antsibull-core - # antsibull-docs -sh==1.14.3 - # via antsibull-core -six==1.16.0 - # via twiggy -snowballstemmer==2.2.0 - # via sphinx -sphinx==7.1.2 - # via - # -c tests/constraints-base.in - # -r tests/requirements-relaxed.in - # antsibull-docs - # sphinx-ansible-theme - # sphinx-notfound-page - # sphinx-rtd-theme - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-jquery - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml -sphinx-ansible-theme==0.10.2 - # via -r tests/requirements-relaxed.in -sphinx-notfound-page==1.0.0 - # via -r tests/requirements-relaxed.in -sphinx-rtd-theme==1.3.0 - # via sphinx-ansible-theme -sphinxcontrib-applehelp==1.0.7 - # via sphinx -sphinxcontrib-devhelp==1.0.5 - # via sphinx -sphinxcontrib-htmlhelp==2.0.4 - # via sphinx -sphinxcontrib-jquery==4.1 - # via sphinx-rtd-theme -sphinxcontrib-jsmath==1.0.1 - # via sphinx -sphinxcontrib-qthelp==1.0.6 - # via sphinx -sphinxcontrib-serializinghtml==1.1.9 - # via sphinx -tomli==2.0.1 - # via - # build - # pyproject-hooks -twiggy==0.5.1 - # via - # antsibull-core - # antsibull-docs -types-docutils==0.18.3 - # via rstcheck -typing-extensions==4.8.0 - # via - # pydantic - # rstcheck -urllib3==2.0.5 - # via requests -yarl==1.9.2 - # via aiohttp diff --git a/tests/requirements.in b/tests/requirements.in index 6ff0f42f867..66399d24d72 100644 --- a/tests/requirements.in +++ b/tests/requirements.in @@ -1,5 +1,15 @@ -# This requirements file is used for stable ansible docs builds -# It depends on specific, tested antsibull-docs and sphinx versions +# This requirements file is used for doc builds -c constraints.in # <-- contains known limitations --r requirements-relaxed.in # <-- contains base set of dependencies + +# Base set of dependencies. + +antsibull-docs +sphinx +sphinx-intl # translation utility used by docs/docsite/Makefile +sphinx-notfound-page # extension used for the custom 404 page (cowsay) +sphinx-ansible-theme # extension used for the custom docs theme +rstcheck +jinja2 # used by hacking/build_library/build_ansible/command_plugins/generate_man.py and dump_keywords.py +pyyaml # used by ansible-core +resolvelib # used by ansible-core diff --git a/tests/requirements.txt b/tests/requirements.txt index 8d092bda5d0..3f113e5263c 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -25,7 +25,7 @@ antsibull-core==2.1.0 antsibull-docs==2.7.0 # via # -c tests/constraints.in - # -r tests/requirements-relaxed.in + # -r tests/requirements.in antsibull-docs-parser==1.0.0 # via antsibull-docs async-timeout==4.0.3 @@ -35,13 +35,17 @@ asyncio-pool==0.6.0 attrs==23.1.0 # via aiohttp babel==2.12.1 - # via sphinx + # via + # sphinx + # sphinx-intl build==1.0.3 # via antsibull-core certifi==2023.7.22 # via requests charset-normalizer==3.2.0 # via requests +click==8.1.8 + # via sphinx-intl docutils==0.18.1 # via # antsibull-docs @@ -60,7 +64,8 @@ imagesize==1.4.1 # via sphinx jinja2==3.1.2 # via - # -r tests/requirements-relaxed.in + # -c tests/constraints.in + # -r tests/requirements.in # antsibull-docs # sphinx markupsafe==2.1.3 @@ -89,17 +94,20 @@ pyproject-hooks==1.0.0 # via build pyyaml==6.0.1 # via - # -r tests/requirements-relaxed.in + # -c tests/constraints.in + # -r tests/requirements.in # antsibull-core # antsibull-docs requests==2.31.0 # via sphinx resolvelib==1.0.1 - # via -r tests/requirements-relaxed.in + # via + # -c tests/constraints.in + # -r tests/requirements.in rstcheck==5.0.0 # via - # -c tests/constraints-base.in - # -r tests/requirements-relaxed.in + # -c tests/constraints.in + # -r tests/requirements.in # antsibull-docs semantic-version==2.10.0 # via @@ -113,11 +121,11 @@ snowballstemmer==2.2.0 # via sphinx sphinx==5.3.0 # via - # -c tests/constraints-base.in # -c tests/constraints.in - # -r tests/requirements-relaxed.in + # -r tests/requirements.in # antsibull-docs # sphinx-ansible-theme + # sphinx-intl # sphinx-notfound-page # sphinx-rtd-theme # sphinxcontrib-applehelp @@ -127,9 +135,11 @@ sphinx==5.3.0 # sphinxcontrib-qthelp # sphinxcontrib-serializinghtml sphinx-ansible-theme==0.10.2 - # via -r tests/requirements-relaxed.in + # via -r tests/requirements.in +sphinx-intl==2.3.1 + # via -r tests/requirements.in sphinx-notfound-page==1.0.0 - # via -r tests/requirements-relaxed.in + # via -r tests/requirements.in sphinx-rtd-theme==1.3.0 # via sphinx-ansible-theme sphinxcontrib-applehelp==1.0.7 @@ -164,3 +174,7 @@ urllib3==2.0.5 # via requests yarl==1.9.2 # via aiohttp + +# The following packages are considered to be unsafe in a requirements file: +setuptools==75.8.0 + # via sphinx-intl