From 19807ab79a3186748062affd507ae7d5f203520c Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 13 Dec 2022 09:54:48 -0300 Subject: [PATCH] Pin packaging while building docs Packaging >=22 no longer supports 'latest' versions, which is the version that is assigned when building the docs. https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045 Also first install pytest, then `docs/en/requirements.txt`: Installing the requirements last will honor pins of libraries shared between pytest and the docs build. --- .readthedocs.yml | 9 ++++++--- doc/en/requirements.txt | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index bc44d38b4..b506c5f40 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -2,9 +2,12 @@ version: 2 python: install: - - requirements: doc/en/requirements.txt - - method: pip - path: . + # Install pytest first, then doc/en/requirements.txt. + # This order is important to honor any pins in doc/en/requirements.txt + # when the pinned library is also a dependency of pytest. + - method: pip + path: . + - requirements: doc/en/requirements.txt build: os: ubuntu-20.04 diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index 0523772d4..b6059723c 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -5,3 +5,7 @@ sphinx-removed-in>=0.2.0 sphinx>=5,<6 sphinxcontrib-trio sphinxcontrib-svg2pdfconverter +# Pin packaging because it no longer handles 'latest' version, which +# is the version that is assigned to the docs. +# See https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045. +packaging <22