From b70c27e46e3d13dbf01db5eebff50bacbd554102 Mon Sep 17 00:00:00 2001 From: Yihuang Yu Date: Wed, 4 Nov 2026 09:56:59 +0800 Subject: [PATCH 1/2] Fix pytest compatibility across Python versions pytest 9 requires Python 3.10+, so it cannot resolve on Python 3.9. Use environment markers to select pytest 8.x below Python 3.10 and pytest 9+ on Python 3.10 and newer. Install test and lint extras from pyproject.toml in CI and remove the duplicate requirements-travis.txt file. Signed-off-by: Yihuang Yu --- .github/workflows/ci.yml | 3 +-- pyproject.toml | 6 +++++- requirements-travis.txt | 5 ----- 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 requirements-travis.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e1f5bf..ae4597f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,5 @@ jobs: - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - run: pip install -r requirements-travis.txt - - run: make install + - run: pip install '.[test,lint]' - run: make check diff --git a/pyproject.toml b/pyproject.toml index cc679e7..eff28b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,11 @@ Repository = "https://github.com/avocado-framework/aexpect" Issues = "https://github.com/avocado-framework/aexpect/issues" [project.optional-dependencies] -test = ["pytest>=9.0.3"] +test = [ + "pytest>=8.3,<9; python_version < '3.9'", + "pytest>=8.4,<9; python_version >= '3.9' and python_version < '3.10'", + "pytest>=9; python_version >= '3.10'", +] lint = ["black", "pycodestyle", "isort", "inspektor"] dev = ["aexpect[test,lint]", "setuptools-scm>=8", "build", "twine"] diff --git a/requirements-travis.txt b/requirements-travis.txt deleted file mode 100644 index 9bd3d78..0000000 --- a/requirements-travis.txt +++ /dev/null @@ -1,5 +0,0 @@ -setuptools==83.0.0 -pycodestyle==2.13.0 -inspektor==0.5.3 -pytest==9.0.3 -black==26.3.1 From e03240f6ef0876e595b1b2a8620085505fd9197d Mon Sep 17 00:00:00 2001 From: Yihuang Yu Date: Wed, 4 Nov 2026 09:57:09 +0800 Subject: [PATCH 2/2] Drop Python 3.8 and add Python 3.14 support Drop Python 3.8 support by raising requires-python to >=3.9 and remove the Python 3.8 classifier and Black target. Add Python 3.14 to classifiers and Black target versions. Use pytest 8.4+ on Python 3.9 and pytest 9+ on Python 3.10 and newer. Signed-off-by: Yihuang Yu --- pyproject.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eff28b7..b3f9b89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,18 +10,18 @@ version = "1.8.0" license = {text = "GPL-2.0-or-later"} authors = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}] maintainers = [{name = "Aexpect developers", email = "avocado-devel@redhat.com"}] -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 6 - Mature", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dependencies = [] @@ -32,8 +32,7 @@ Issues = "https://github.com/avocado-framework/aexpect/issues" [project.optional-dependencies] test = [ - "pytest>=8.3,<9; python_version < '3.9'", - "pytest>=8.4,<9; python_version >= '3.9' and python_version < '3.10'", + "pytest>=8.4,<9; python_version < '3.10'", "pytest>=9; python_version >= '3.10'", ] lint = ["black", "pycodestyle", "isort", "inspektor"] @@ -51,7 +50,7 @@ local_scheme = "node-and-date" [tool.black] line-length = 79 -target-version = ["py38", "py39", "py310", "py311", "py312", "py313"] +target-version = ["py39", "py310", "py311", "py312", "py313", "py314"] [tool.pytest.ini_options] addopts = "-ra"