Skip to content

Commit 34d13af

Browse files
HayaoSuzukicsernazs
authored andcommitted
Add support for Python 3.15, drop support for Python 3.9 and 3.10.
1 parent e225c8a commit 34d13af

9 files changed

Lines changed: 29 additions & 185 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- master
1010

1111
env:
12-
POETRY_VERSION: "2.1.1"
12+
POETRY_VERSION: "2.5.1"
1313

1414
jobs:
1515
cs:
@@ -38,13 +38,13 @@ jobs:
3838
name: Test with python ${{ matrix.python-version }} / ${{ matrix.os-version }}
3939
strategy:
4040
matrix:
41-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
41+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
4242
os-version: ["ubuntu-latest", "windows-latest"]
4343
exclude:
4444
- os-version: windows-latest
4545
include:
4646
- os-version: windows-latest
47-
python-version: 3.14
47+
python-version: "3.15"
4848

4949
runs-on: ${{ matrix.os-version }}
5050

‎poetry.lock‎

Lines changed: 9 additions & 154 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ classifiers = [
1212
"Intended Audience :: Developers",
1313
"Operating System :: OS Independent",
1414
"Programming Language :: Python :: 3",
15-
"Programming Language :: Python :: 3.10",
1615
"Programming Language :: Python :: 3.11",
1716
"Programming Language :: Python :: 3.12",
1817
"Programming Language :: Python :: 3.13",
1918
"Programming Language :: Python :: 3.14",
19+
"Programming Language :: Python :: 3.15",
2020
"Topic :: Software Development :: Libraries :: Python Modules",
2121
"Framework :: Pytest",
2222
]
23-
requires-python = ">=3.10"
23+
requires-python = ">=3.11"
2424
dependencies = [
2525
"Werkzeug >= 3.0.0",
2626
]
@@ -49,15 +49,14 @@ optional = true
4949
[tool.poetry.group.develop.dependencies]
5050
pre-commit = ">=4.6.0,<5.0"
5151
requests = "*"
52-
typing_extensions = { version = ">=4.0", markers = "python_version < '3.11'" }
52+
typing_extensions = { version = ">=4.0", markers = "python_version < '3.12'" }
5353
Sphinx = ">=5.1.1,<9.0.0"
5454
sphinx-rtd-theme = ">=1,<4"
5555
reno = "*"
5656
types-requests = "*"
5757
pytest = ">=9.0.3,<10.0.0"
5858
pytest-cov = ">=7.1.0,<8"
5959
coverage = ">=7.14.1,<8.0.0"
60-
tomli = { version = "*", markers = "python_version < '3.11'"}
6160
black = "*"
6261
ruff = "*"
6362
mypy = "*"
@@ -81,7 +80,6 @@ coverage = "*"
8180
requests = "*"
8281
types-requests = "*"
8382
pre-commit = "*"
84-
tomli = { version = "*", markers = "python_version < '3.11'"}
8583
mypy = "*"
8684

8785
[build-system]
@@ -146,7 +144,7 @@ lint.ignore = [
146144
"UP032",
147145
]
148146
line-length = 120
149-
target-version = "py310"
147+
target-version = "py311"
150148
exclude = ["doc", "example*.py", "tests/examples/*.py"]
151149

152150
[tool.ruff.lint.pylint]

‎pytest_httpserver/bake.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
import sys
88
from re import Pattern
99
from types import TracebackType
10-
11-
if sys.version_info >= (3, 11):
12-
from typing import Self
13-
else:
14-
from typing_extensions import Self
10+
from typing import Self
1511

1612
if sys.version_info >= (3, 12):
1713
from typing import Unpack

‎pytest_httpserver/httpserver.py‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@
3838
import sys
3939
from ssl import SSLContext
4040
from types import TracebackType
41+
from typing import Self
4142

4243
from werkzeug.serving import BaseWSGIServer
4344

44-
if sys.version_info >= (3, 11):
45-
from typing import Self
46-
else:
47-
from typing_extensions import Self
48-
4945
if sys.version_info >= (3, 12):
5046
from typing import Unpack
5147
else:
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
upgrade:
3+
- |
4+
Python 3.9 and 3.10 are no longer supported. Python 3.11 or newer is required.
5+
features:
6+
- |
7+
Add support for Python 3.15.

‎tests/test_release.py‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import shutil
66
import subprocess
77
import tarfile
8+
import tomllib
89
import zipfile
910
from dataclasses import dataclass
1011
from pathlib import Path
@@ -15,21 +16,14 @@
1516
if TYPE_CHECKING:
1617
from collections.abc import Iterable
1718

18-
try:
19-
import tomllib
20-
except ImportError:
21-
# Unfortunately mypy cannot handle this try/expect pattern, and "type: ignore"
22-
# is the simplest work-around. See: https://github.com/python/mypy/issues/1153
23-
import tomli as tomllib # type: ignore
24-
2519
# TODO: skip if poetry is not available or add mark to test it explicitly
2620

2721

2822
pytestmark = pytest.mark.release
2923

3024
NAME = "pytest-httpserver"
3125
NAME_UNDERSCORE = NAME.replace("-", "_")
32-
PY_MAX_VERSION = (3, 14)
26+
PY_MAX_VERSION = (3, 15)
3327

3428

3529
@pytest.fixture(scope="session")

‎tox.ini‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
[tox]
22
envlist =
3-
py39
4-
py310
53
py311
64
py312
75
py313
86
py314
7+
py315
98

109
base_python = py312
1110

‎tox.nix‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ let
88
in pkgs.mkShell {
99
buildInputs = with pkgs; [
1010
(basePython python312)
11+
(toxPython python315)
1112
(toxPython python314)
1213
(toxPython python313)
1314
(toxPython python311)
14-
(toxPython python310)
15-
(toxPython python39)
1615

1716
bashInteractive
1817
];

0 commit comments

Comments
 (0)