From 0e26b5deca1aaa821921df95e0bfb01b8f51f00a Mon Sep 17 00:00:00 2001 From: xqt Date: Sat, 7 Dec 2024 12:17:21 +0100 Subject: [PATCH] tests: install fake_useragent != 2.0 for Python 3.8 Bug: T381715 Change-Id: I5da177c5a1d2f7f09fa4ea7c45d6266c6b74a839 --- .github/workflows/pywikibot-ci.yml | 1 - .github/workflows/sysop_write_tests-ci.yml | 1 - .github/workflows/windows_tests.yml | 1 - setup.py | 5 ++++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 4a1c62e638..0c9e7da70c 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -82,7 +82,6 @@ jobs: if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi pip install wikitextparser - pip install "fake_useragent != 2.0; python_version=='3.8'" - name: Install setuptools if: ${{ (matrix.python-version >= '3.12') || (matrix.os == 'macOS-latest') }} diff --git a/.github/workflows/sysop_write_tests-ci.yml b/.github/workflows/sysop_write_tests-ci.yml index d0bf618ef8..a8409455c9 100644 --- a/.github/workflows/sysop_write_tests-ci.yml +++ b/.github/workflows/sysop_write_tests-ci.yml @@ -44,7 +44,6 @@ jobs: pip --version if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install "fake_useragent != 2.0; python_version=='3.8'" - name: Generate user files run: | diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index d927743f86..1abdf46b86 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -53,7 +53,6 @@ jobs: pip install -r dev-requirements.txt pip install -r requirements.txt pip install wikitextparser - pip install "fake_useragent != 2.0; python_version=='3.8'" - name: Generate user files run: | diff --git a/setup.py b/setup.py index f360bf86b6..6c6e4c279f 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,10 @@ 'mwoauth!=0.3.1,>=0.2.4', ], 'html': ['beautifulsoup4>=4.7.1'], - 'http': ['fake-useragent>=1.4.0'], + 'http': [ + 'fake-useragent>=1.4.0; python_version > "3.8"', + 'fake-useragent>=1.4.0, < 2.0.0; python_version < "3.9"', # T381715 + ], }