Skip to content

Commit 7ad2d51

Browse files
authored
Merge pull request #254 from hugovk/rm-3.7
Drop support for EOL Python 3.7 and bump GitHub Actions
2 parents aae80a5 + fa8b276 commit 7ad2d51

File tree

9 files changed

+15
-31
lines changed

9 files changed

+15
-31
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Lint
22

33
on:
44
push:
5-
branches: [ master ]
65
pull_request:
7-
branches: [ master ]
86
type: [ "opened", "reopened", "synchronize" ]
97

108
env:

.github/workflows/test.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Test
22

33
on:
44
push:
5-
branches: [ master ]
65
pull_request:
7-
branches: [ master ]
86
type: [ "opened", "reopened", "synchronize" ]
97
schedule:
108
- cron: '0 12 * * 0' # run once a week on Sunday
@@ -22,13 +20,12 @@ jobs:
2220
fail-fast: false
2321
matrix:
2422
python-version: [
25-
"3.7",
2623
"3.8",
2724
"3.9",
2825
"3.10",
2926
"3.11",
3027
"3.12",
31-
"pypy-3.9",
28+
"pypy-3.10",
3229
]
3330
pytest-version: [
3431
"7.0.*",
@@ -38,9 +35,6 @@ jobs:
3835
"7.4.*",
3936
"main",
4037
]
41-
exclude:
42-
# pytest-main only supports Python 3.8+
43-
- { python-version: "3.7", pytest-version: "main" }
4438
steps:
4539
- uses: actions/checkout@v4
4640

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repos:
44
rev: 24.2.0
55
hooks:
66
- id: black
7-
args: [--safe, --quiet, --target-version, py37]
7+
args: [--safe, --quiet, --target-version, py38]
88
- repo: https://github.com/pre-commit/pre-commit-hooks
99
rev: v4.5.0
1010
hooks:
@@ -30,7 +30,7 @@ repos:
3030
rev: v3.15.1
3131
hooks:
3232
- id: pyupgrade
33-
args: [--py37-plus]
33+
args: [--py38-plus]
3434
- repo: local
3535
hooks:
3636
- id: rst

CHANGES.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ Changelog
44
13.1 (unreleased)
55
-----------------
66

7-
- Nothing changed yet.
7+
Breaking changes
8+
++++++++++++++++
89

10+
- Drop support for Python 3.7.
911

1012
13.0 (2023-11-22)
1113
-----------------

CONTRIBUTING.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ Preparing Pull Requests
2929

3030
#. Install `tox <https://tox.readthedocs.io/en/latest/>`_:
3131

32-
Tox is used to run all the tests and will automatically setup virtualenvs
32+
tox is used to run all the tests and will automatically setup virtualenvs
3333
to run the tests in. Implicitly https://virtualenv.pypa.io/ is used::
3434

3535
$ pip install tox
36-
$ tox -e linting,py37
36+
$ tox -e linting,py312
3737

38-
#. Follow **PEP-8** for naming and `black <https://github.com/psf/black>`_ for formatting.
38+
#. Follow **PEP 8** for naming and `black <https://github.com/psf/black>`_ for formatting.
3939

4040
#. Add a line item to the current **unreleased** version in ``CHANGES.rst``,
4141
unless the change is trivial.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Requirements
1919

2020
You will need the following prerequisites in order to use pytest-rerunfailures:
2121

22-
- Python 3.7, up to 3.12, or PyPy3
22+
- Python 3.8+ or PyPy3
2323
- pytest 7.0 or newer
2424

2525
This plugin can recover from a hard crash with the following optional

pytest_rerunfailures.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import hashlib
2+
import importlib.metadata
23
import os
34
import platform
45
import re
@@ -15,11 +16,6 @@
1516
from _pytest.runner import runtestprotocol
1617
from packaging.version import parse as parse_version
1718

18-
if sys.version_info >= (3, 8):
19-
import importlib.metadata as importlib_metadata
20-
else:
21-
import importlib_metadata
22-
2319
try:
2420
from xdist.newhooks import pytest_handlecrashitem
2521

@@ -39,8 +35,8 @@ def works_with_current_xdist():
3935
4036
"""
4137
try:
42-
d = importlib_metadata.distribution("pytest-xdist")
43-
except importlib_metadata.PackageNotFoundError:
38+
d = importlib.metadata.distribution("pytest-xdist")
39+
except importlib.metadata.PackageNotFoundError:
4440
return None
4541
else:
4642
return parse_version(d.version) >= parse_version("1.20")

setup.cfg

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[bdist_wheel]
2-
universal = 0
3-
41
[check-manifest]
52
ignore =
63
.pre-commit-config.yaml
@@ -27,7 +24,6 @@ classifiers =
2724
Topic :: Software Development :: Testing
2825
Topic :: Utilities
2926
Programming Language :: Python :: 3
30-
Programming Language :: Python :: 3.7
3127
Programming Language :: Python :: 3.8
3228
Programming Language :: Python :: 3.9
3329
Programming Language :: Python :: 3.10
@@ -40,11 +36,10 @@ classifiers =
4036
[options]
4137
zip_safe = False
4238
py_modules = pytest_rerunfailures
43-
python_requires = >= 3.7
39+
python_requires = >= 3.8
4440
install_requires =
4541
packaging >= 17.1
4642
pytest >= 7
47-
importlib-metadata>=1;python_version<"3.8"
4843

4944
[options.entry_points]
5045
pytest11 =

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ max-line-length = 88
1111
[tox]
1212
envlist =
1313
linting
14-
py{37,38,39,310,311,312,py3}-pytest{70,71,72,73,74}
15-
py{38,39,310,311,312,py3}-pytest{main}
14+
py{38,39,310,311,312,py3}-pytest{70,71,72,73,74,main}
1615
minversion = 4.0
1716

1817
[testenv]

0 commit comments

Comments
 (0)