Skip to content

Commit cdc6bd1

Browse files
sanders41seifertm
authored andcommitted
Add support for pytest 9 and drop Python 3.9 support
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Add changelog docs: Split up change fragment into separate ones.
1 parent 03dd96a commit cdc6bd1

File tree

7 files changed

+11
-16
lines changed

7 files changed

+11
-16
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
strategy:
7474
matrix:
7575
os: [ubuntu, windows]
76-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 3.14t]
76+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 3.14t]
7777
required: [true]
7878

7979
steps:

changelog.d/1278.added.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support for pytest 9

changelog.d/1278.removed.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support for Python 3.9

constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Pygments==2.19.2
3737
pycparser==2.23
3838
pydantic==2.11.10
3939
pydantic-core==2.33.2
40-
pytest==8.4.2
40+
pytest==9.0.0
4141
readme-renderer==44.0
4242
requests==2.32.5
4343
requests-toolbelt==1.0.0

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ maintainers = [
2020
authors = [
2121
{ name = "Tin Tvrtković", email = "tinchester@gmail.com" },
2222
]
23-
requires-python = ">=3.9"
23+
requires-python = ">=3.10"
2424
classifiers = [
2525
"Development Status :: 5 - Production/Stable",
2626
"Framework :: AsyncIO",
2727
"Framework :: Pytest",
2828
"Intended Audience :: Developers",
2929
"Programming Language :: Python :: 3 :: Only",
30-
"Programming Language :: Python :: 3.9",
3130
"Programming Language :: Python :: 3.10",
3231
"Programming Language :: Python :: 3.11",
3332
"Programming Language :: Python :: 3.12",
@@ -42,7 +41,7 @@ dynamic = [
4241

4342
dependencies = [
4443
"backports-asyncio-runner>=1.1,<2; python_version<'3.11'",
45-
"pytest>=8.2,<9",
44+
"pytest>=8.2,<10",
4645
"typing-extensions>=4.12; python_version<'3.13'",
4746
]
4847
optional-dependencies.docs = [

pytest_asyncio/plugin.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from collections.abc import (
1717
AsyncIterator,
1818
Awaitable,
19+
Callable,
1920
Generator,
2021
Iterable,
2122
Iterator,
@@ -24,10 +25,9 @@
2425
from types import AsyncGeneratorType, CoroutineType
2526
from typing import (
2627
Any,
27-
Callable,
2828
Literal,
29+
ParamSpec,
2930
TypeVar,
30-
Union,
3131
overload,
3232
)
3333

@@ -49,11 +49,6 @@
4949
PytestPluginManager,
5050
)
5151

52-
if sys.version_info >= (3, 10):
53-
from typing import ParamSpec
54-
else:
55-
from typing_extensions import ParamSpec
56-
5752
if sys.version_info >= (3, 11):
5853
from asyncio import Runner
5954
else:
@@ -65,7 +60,7 @@
6560
from typing_extensions import TypeIs
6661

6762
_ScopeName = Literal["session", "package", "module", "class", "function"]
68-
_R = TypeVar("_R", bound=Union[Awaitable[Any], AsyncIterator[Any]])
63+
_R = TypeVar("_R", bound=Awaitable[Any] | AsyncIterator[Any])
6964
_P = ParamSpec("_P")
7065
FixtureFunction = Callable[_P, _R]
7166

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 4.28.0
3-
envlist = build, py39, py310, py311, py312, py313, py314, pytest-min, docs, pyright
3+
envlist = build, py310, py311, py312, py313, py314, pytest-min, docs, pyright
44
isolated_build = true
55
passenv =
66
CI
@@ -90,8 +90,7 @@ skip_install = true
9090

9191
[gh-actions]
9292
python =
93-
3.9: py39, pytest-min, build
94-
3.10: py310
93+
3.10: py310, pytest-min, build
9594
3.11: py311
9695
3.12: py312
9796
3.13: py313, pyright

0 commit comments

Comments
 (0)