From 284eae4376877d4ea54c23acd3a9075a216548f0 Mon Sep 17 00:00:00 2001 From: xqt Date: Mon, 25 Nov 2024 08:28:46 +0100 Subject: [PATCH] tests: use tomli for test running with Python < 3.11 Bug: T380697 Change-Id: I6968a9b79cd4122af1070209f01e0a8d00c35ddb --- .github/workflows/doctest.yml | 1 + .github/workflows/login_tests-ci.yml | 1 + .github/workflows/oauth_tests-ci.yml | 2 +- dev-requirements.txt | 3 +++ docs/requirements.txt | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml index 615fb557e1..e14c36b09c 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -60,6 +60,7 @@ jobs: python -m pip install --upgrade pip pip --version pip install coverage + pip install "tomli; python_version < '3.11'" pip install "importlib_metadata ; python_version < '3.8'" pip install mwparserfromhell pip install packaging diff --git a/.github/workflows/login_tests-ci.yml b/.github/workflows/login_tests-ci.yml index d4f3a06b5a..168790acaf 100644 --- a/.github/workflows/login_tests-ci.yml +++ b/.github/workflows/login_tests-ci.yml @@ -86,6 +86,7 @@ jobs: python -m pip install --upgrade pip pip --version pip install coverage + pip install "tomli; python_version < '3.11'" pip install "importlib_metadata ; python_version < '3.8'" pip install mwparserfromhell pip install packaging diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index 5900c59dc9..9435725830 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -84,6 +84,7 @@ jobs: python -m pip install --upgrade pip pip --version pip install coverage + pip install "tomli; python_version < '3.11'" pip install "importlib_metadata ; python_version < '3.8'" pip install mwparserfromhell # PyJWT added due to T380270 @@ -91,7 +92,6 @@ jobs: pip install mwoauth pip install packaging pip install requests - pip install "tomli >= 2.0.2; python_version < '3.11'" - name: Generate family files if: ${{ matrix.family == 'wpbeta' }} diff --git a/dev-requirements.txt b/dev-requirements.txt index a87313f96d..60cc9e917e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,6 +10,9 @@ pytest-xvfb>=3.0.0 pre-commit coverage>=5.2.1 +# required for coverage (T380697) +tomli>=2.0.1; python_version < "3.11" + # optional but needed for tests fake-useragent diff --git a/docs/requirements.txt b/docs/requirements.txt index 090e200042..0dbffe905c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,5 +6,5 @@ rstcheck >=6.2.4 sphinxext-opengraph >= 0.9.1 sphinx-copybutton >= 0.5.2 sphinx-tabs >= 3.4.7 -tomli >= 2.0.2; python_version < '3.11' +tomli >= 2.0.1; python_version < '3.11' furo >= 2024.8.6