Skip to content

Remove EOL Python 3.7 and 3.8 from CI #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/pythontests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- python-version: "pypy-3.7"
os: ubuntu-22.04
- python-version: "pypy-3.9"
os: ubuntu-latest
- python-version: "pypy-3.10"
os: ubuntu-latest
- python-version: "3.7"
os: ubuntu-22.04
- python-version: "3.7"
os: windows-latest
- python-version: "pypy-3.11"
os: ubuntu-latest
env:
OS: ${{ matrix.os }}
steps:
Expand All @@ -51,10 +47,10 @@ jobs:
- name: Run tests
run: |
TOX_PYTHON_VERSION=$(if [[ ${{ matrix.python-version }} == pypy* ]]; then echo ${{ matrix.python-version }} | tr -d .-; else echo py${{ matrix.python-version }} | tr -d .-; fi)
COV_CMD=$(if [ ${{ matrix.python-version }} == 3.10 ]; then echo "--cov=./pytest_order/ --cov-report=xml"; else echo ; fi) tox -e $(tox -l | grep "$TOX_PYTHON_VERSION" | paste -sd "," -)
COV_CMD=$(if [ ${{ matrix.python-version }} == 3.12 ]; then echo "--cov=./pytest_order/ --cov-report=xml"; else echo ; fi) tox -e $(tox -l | grep "$TOX_PYTHON_VERSION" | paste -sd "," -)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: ${{ success() && matrix.python-version == 3.10 }}
if: ${{ success() && matrix.python-version == 3.12 }}
with:
env_vars: OS
name: codecov-pytest-order
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

### Changes
* removed official support for Python 3.7 and 3.8 (EOL), added Python 3.13

### Infrastructure
* use trusted publisher for release (see https://docs.pypi.org/trusted-publishers/)
* pin Python 3.7 builds to ubuntu 22.04 (not available in 24.04)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ relationship to other tests.
[pytest-ordering](https://github.com/ftobia/pytest-ordering) that provides
additional features like ordering relative to other tests.

`pytest-order` works with Python 3.7 - 3.12, with pytest
versions >= 5.0.0 for all versions up to Python 3.9, and for pytest >=
6.2.4 for Python >= 3.10. `pytest-order` runs on Linux, macOS and Windows.
`pytest-order` works with Python 3.9 - 3.13, with pytest
versions >= 5.0.0 for Python 3.9, and for pytest >= 6.2.4 for Python >= 3.10.
`pytest-order` runs on Linux, macOS and Windows.

Documentation
-------------
Expand Down
35 changes: 19 additions & 16 deletions docs/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ ordering, all configuration options) that are not available in

Supported Python and pytest versions
------------------------------------
``pytest-order`` supports python 3.7 - 3.12 and pypy3, and is
``pytest-order`` supports python 3.9 - 3.13 and pypy3, and is
compatible with pytest 5.0.0 or newer (older versions may also work, but are
not tested) for Python versions up to 3.9, and with pytest >= 6.2.4 for
Python versions >= 3.10.
not tested) for Python 3.9, and with pytest >= 6.2.4 for Python versions >= 3.10.

All supported combinations of Python and pytest versions are tested in
the CI builds. The plugin shall work under Linux, MacOs and Windows.
Expand Down Expand Up @@ -83,15 +82,17 @@ For example, for the following tests:

the output is something like::

$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
collected 2 items

test_foo.py:2: test_foo PASSED
test_foo.py:6: test_bar PASSED
$ pytest -vv example/introduction/test_quickstart.py
============================================ test session starts =============================================
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /home/user/.venv/pytest-order-3.13/bin/python3.13
rootdir: /home/user/projects/git/pytest-order
plugins: order-1.3.0
collected 2 items

=========================== 2 passed in 0.01 seconds ===========================
example/introduction/test_quickstart.py::test_foo PASSED [ 50%]
example/introduction/test_quickstart.py::test_bar PASSED [100%]
============================================= 2 passed in 0.02s ==============================================

With ``pytest-order``, you can change the default ordering as follows:

Expand All @@ -112,12 +113,14 @@ With ``pytest-order``, you can change the default ordering as follows:
This will generate the output::

$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
plugins: order
============================================ test session starts =============================================
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /home/user/.venv/pytest-order-3.13/bin/python3.13
rootdir: /home/user/projects/git/pytest-order
plugins: order-1.3.0
collected 2 items

test_foo.py:7: test_bar PASSED
test_foo.py:3: test_foo PASSED
example/introduction/test_quickstart.py::test_bar PASSED [ 50%]
example/introduction/test_quickstart.py::test_foo PASSED [100%]
=========================== 2 passed in 0.02 seconds ===========================

=========================== 2 passed in 0.01 seconds ===========================
Note the changed test execution order.
12 changes: 6 additions & 6 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ are used in Python lists, e.g. to count from the end:

$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
plugins: order
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /home/user/.venv/pytest-order-3.13/bin/python3.13
plugins: order-1.3.0
collected 4 items

test_foo.py:17: test_one PASSED
Expand Down Expand Up @@ -103,8 +103,8 @@ above:

$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
plugins: order
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /home/user/.venv/pytest-order-3.13/bin/python3.13
plugins: order-1.3.0
collected 4 items

test_foo.py:17: test_one PASSED
Expand Down Expand Up @@ -213,8 +213,8 @@ define the order relative to these tests:

$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
plugins: order
platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 -- /home/user/.venv/pytest-order-3.13/bin/python3.13
plugins: order-1.3.0
collected 3 items

test_foo.py:11: test_first PASSED
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"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 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[tox]
envlist =
{py37,pypy37}-pytest{50,54,60,62,624,70,74}
{py38,py39,pypy39}-pytest{50,54,60,62,624,70,74,80}
{py310,py311,py312,pypy310}-pytest{624,70,74,80}
{py39,pypy39}-pytest{50,54,60,62,624,70,74,80,83}
{py310,py311,py312,py313,pypy310,pypy311}-pytest{624,70,74,80,83}
[testenv]
deps =
pytest50: pytest>=5.0,<5.1
Expand All @@ -13,9 +12,10 @@ deps =
pytest70: pytest>=7.0,<7.1
pytest74: pytest>=7.3,<8.0
pytest80: pytest==8.0.1
pytest83: pytest>=8.3,<9.0
pytest-cov<2.10
pytest{50,54}: pytest-xdist<2.0.0
pytest{60,62,624,70,74,80}: pytest-xdist
pytest{60,62,624,70,74,80,83}: pytest-xdist
pytest-dependency>=0.5.1
pytest-mock

Expand Down