Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-asyncio for
openSUSE:Factory checked in at 2025-12-09 12:46:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-asyncio (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-asyncio.new.1939 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-asyncio"
Tue Dec 9 12:46:03 2025 rev:29 rq:1320317 version:1.3.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-asyncio/python-pytest-asyncio.changes
2025-11-05 16:19:39.261482376 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-asyncio.new.1939/python-pytest-asyncio.changes
2025-12-09 12:48:38.783610946 +0100
@@ -1,0 +2,7 @@
+Tue Nov 25 01:17:19 UTC 2025 - Steve Kowalik <[email protected]>
+
+- Update to 1.3.0:
+ * Remove support for Python 3.9.
+ * Add support for pytest 9.
+
+-------------------------------------------------------------------
Old:
----
pytest-asyncio-1.2.0.tar.gz
New:
----
pytest-asyncio-1.3.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-asyncio.spec ++++++
--- /var/tmp/diff_new_pack.DlUxRd/_old 2025-12-09 12:48:48.868036355 +0100
+++ /var/tmp/diff_new_pack.DlUxRd/_new 2025-12-09 12:48:48.872036524 +0100
@@ -26,13 +26,13 @@
%endif
%{?sle15_python_module_pythons}
Name: python-pytest-asyncio%{psuffix}
-Version: 1.2.0
+Version: 1.3.0
Release: 0
Summary: Pytest support for asyncio
License: Apache-2.0
URL: https://github.com/pytest-dev/pytest-asyncio
Source:
https://github.com/pytest-dev/pytest-asyncio/archive/v%{version}.tar.gz#/pytest-asyncio-%{version}.tar.gz
-BuildRequires: %{python_module base >= 3.8}
+BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
@@ -40,7 +40,7 @@
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: (python-pytest >= 8.2.0 with python-pytest < 9)
+Requires: (python-pytest >= 8.2.0 with python-pytest < 10)
%if 0%{?python_version_nodots} < 313
Requires: python-typing-extensions >= 4.12
%endif
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.DlUxRd/_old 2025-12-09 12:48:48.920038549 +0100
+++ /var/tmp/diff_new_pack.DlUxRd/_new 2025-12-09 12:48:48.924038718 +0100
@@ -1,6 +1,6 @@
-mtime: 1757756878
-commit: 29aa58b7fbdf4866c1dc5968b37155939c2c216e3fd922d85f3b5107b74a61b1
+mtime: 1764033470
+commit: ac867cd2f78eddfac1cfca329f59b2c0240a847dbac2353c47c1ba66250bb2b4
url: https://src.opensuse.org/python-pytest/python-pytest-asyncio.git
-revision: 29aa58b7fbdf4866c1dc5968b37155939c2c216e3fd922d85f3b5107b74a61b1
+revision: ac867cd2f78eddfac1cfca329f59b2c0240a847dbac2353c47c1ba66250bb2b4
projectscmsync: https://src.opensuse.org/python-pytest/_ObsPrj.git
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2025-11-25 07:36:54.000000000 +0100
@@ -0,0 +1 @@
+.osc
++++++ pytest-asyncio-1.2.0.tar.gz -> pytest-asyncio-1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/.github/workflows/main.yml
new/pytest-asyncio-1.3.0/.github/workflows/main.yml
--- old/pytest-asyncio-1.2.0/.github/workflows/main.yml 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/.github/workflows/main.yml 2025-11-10
16:49:48.000000000 +0100
@@ -42,7 +42,7 @@
id: version
run: python ./tools/get-version.py >> $GITHUB_OUTPUT
- name: Upload artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: dist
path: dist
@@ -73,16 +73,8 @@
strategy:
matrix:
os: [ubuntu, windows]
- python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 3.14t]
required: [true]
- include:
- - os: ubuntu
- python-version: 3.14-dev
- required: false
- - os: windows
- python-version: 3.14-dev
- required: false
-
steps:
- uses: actions/checkout@v5
@@ -101,7 +93,7 @@
run: python -m tox
- name: Store coverage data
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
if: "!endsWith(matrix.os, 'windows')"
with:
name: coverage-python-${{ matrix.python-version }}
@@ -135,7 +127,7 @@
set -xe
python -m pip install --upgrade coverage[toml]
- name: Download coverage data for all test runs
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
pattern: coverage-*
path: coverage
@@ -190,12 +182,12 @@
run: |
pandoc --wrap=preserve -o release-notes.md release-notes.rst
- name: Upload artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v5
with:
name: release-notes.md
path: release-notes.md
- name: Download distributions
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: dist
path: dist
@@ -221,7 +213,7 @@
id-token: write
steps:
- name: Download distributions
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: dist
path: dist
@@ -240,7 +232,7 @@
id-token: write
steps:
- name: Download distributions
- uses: actions/download-artifact@v5
+ uses: actions/download-artifact@v6
with:
name: dist
path: dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/.pre-commit-config.yaml
new/pytest-asyncio-1.3.0/.pre-commit-config.yaml
--- old/pytest-asyncio-1.2.0/.pre-commit-config.yaml 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/.pre-commit-config.yaml 2025-11-10
16:49:48.000000000 +0100
@@ -13,12 +13,12 @@
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.12.12
+ rev: v0.14.3
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/asottile/pyupgrade
- rev: v3.20.0
+ rev: v3.21.0
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/yesqa
@@ -41,7 +41,7 @@
- id: yamlfmt
args: [--mapping, '2', --sequence, '2', --offset, '0']
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.17.1
+ rev: v1.18.2
hooks:
- id: mypy
exclude: ^(docs|tests)/.*
@@ -52,7 +52,7 @@
hooks:
- id: python-use-type-annotations
- repo: https://github.com/rhysd/actionlint
- rev: v1.7.7
+ rev: v1.7.8
hooks:
- id: actionlint-docker
args:
@@ -64,17 +64,17 @@
- 'SC1004:'
stages: [manual]
- repo: https://github.com/sirosen/check-jsonschema
- rev: 0.33.3
+ rev: 0.34.1
hooks:
- id: check-github-actions
- repo: https://github.com/tox-dev/pyproject-fmt
- rev: v2.6.0
+ rev: v2.11.0
hooks:
- id: pyproject-fmt
#
https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
additional_dependencies: [tox>=4.28]
- repo: https://github.com/zizmorcore/zizmor-pre-commit
- rev: v1.12.1
+ rev: v1.16.2
hooks:
- id: zizmor
ci:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/constraints.txt
new/pytest-asyncio-1.3.0/constraints.txt
--- old/pytest-asyncio-1.2.0/constraints.txt 2025-09-12 09:21:22.000000000
+0200
+++ new/pytest-asyncio-1.3.0/constraints.txt 2025-11-10 16:49:48.000000000
+0100
@@ -1,22 +1,22 @@
alabaster==0.7.16
annotated-types-0.7.0
-attrs==25.3.0
+attrs==25.4.0
babel==2.17.0
backports.asyncio.runner==1.2.0
backports.tarfile==1.2.0
-certifi==2025.8.3
-charset-normalizer==3.4.3
+certifi==2025.10.5
+charset-normalizer==3.4.4
check-wheel-contents==0.6.1
-cffi==1.17.1
+cffi==2.0.0
click==8.1.8
-coverage==7.10.6
-cryptography==45.0.7
+coverage==7.10.7
+cryptography==46.0.3
docutils==0.21.2
exceptiongroup==1.3.0
-hypothesis==6.138.15
+hypothesis==6.141.1
iniconfig==2.1.0
id==1.5.0
-idna==3.10
+idna==3.11
imagesize==1.4.1
importlib_metadata==8.7.0
iniconfig==2.1.0
@@ -27,25 +27,25 @@
Jinja2==3.1.6
keyring==25.6.0
markdown-it-py==3.0.0
-MarkupSafe==3.0.2
+MarkupSafe==3.0.3
mdurl==0.1.2
more-itertools==10.8.0
-nh3==0.3.0
+nh3==0.3.2
packaging==25.0
pluggy==1.6.0
Pygments==2.19.2
-pycparser==2.22
-pydantic==2.11.7
+pycparser==2.23
+pydantic==2.11.10
pydantic-core==2.33.2
-pytest==8.4.2
+pytest==9.0.0
readme-renderer==44.0
requests==2.32.5
requests-toolbelt==1.0.0
rfc3986==2.0.0
-rich==14.1.0
+rich==14.2.0
SecretStorage==3.3.3
setuptools==80.9.0
-setuptools-scm==9.2.0
+setuptools-scm==9.2.2
snowballstemmer==3.0.1
sortedcontainers==2.4.0
Sphinx==8.0.2
@@ -57,10 +57,10 @@
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
-tomli==2.2.1
+tomli==2.3.0
twine==6.2.0
typing_extensions==4.15.0
-typing-inspection==0.4.1
+typing-inspection==0.4.2
urllib3==2.5.0
wheel-filename==1.4.2
zipp==3.23.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/docs/how-to-guides/migrate_from_0_23.rst
new/pytest-asyncio-1.3.0/docs/how-to-guides/migrate_from_0_23.rst
--- old/pytest-asyncio-1.2.0/docs/how-to-guides/migrate_from_0_23.rst
2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/docs/how-to-guides/migrate_from_0_23.rst
2025-11-10 16:49:48.000000000 +0100
@@ -1,3 +1,5 @@
+.. _how_to_guides/migrate_from_0_23:
+
========================================
How to migrate from pytest-asyncio v0.23
========================================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/docs/reference/changelog.rst
new/pytest-asyncio-1.3.0/docs/reference/changelog.rst
--- old/pytest-asyncio-1.2.0/docs/reference/changelog.rst 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/docs/reference/changelog.rst 2025-11-10
16:49:48.000000000 +0100
@@ -10,6 +10,28 @@
.. towncrier release notes start
+`1.3.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.3.0>`_ - 2025-11-10
+===============================================================================
+
+Removed
+-------
+
+- Support for Python 3.9 (`#1278
<https://github.com/pytest-dev/pytest-asyncio/issues/1278>`_)
+
+
+Added
+-----
+
+- Support for pytest 9 (`#1279
<https://github.com/pytest-dev/pytest-asyncio/issues/1279>`_)
+
+
+Notes for Downstream Packagers
+------------------------------
+
+- Tested Python versions include free threaded Python 3.14t (`#1274
<https://github.com/pytest-dev/pytest-asyncio/issues/1274>`_)
+- Tests are run in the same pytest process, instead of spawning a subprocess
with `pytest.Pytester.runpytest_subprocess`. This prevents the test suite from
accidentally using a system installation of pytest-asyncio, which could result
in test errors. (`#1275
<https://github.com/pytest-dev/pytest-asyncio/issues/1275>`_)
+
+
`1.2.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.2.0>`_ - 2025-09-12
===============================================================================
@@ -62,6 +84,10 @@
`1.0.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.0.0>`_ - 2025-05-26
===============================================================================
+.. seealso::
+
+ :ref:`How to migrate from pytest-asyncio v0.23
<how_to_guides/migrate_from_0_23>`
+
Removed
-------
@@ -211,6 +237,10 @@
This release is backwards-compatible with v0.21.
Changes are non-breaking, unless you upgrade from v0.22.
+.. seealso::
+
+ :ref:`How to migrate from pytest-asyncio v0.21
<how_to_guides/migrate_from_0_21>`
+
- BREAKING: The *asyncio_event_loop* mark has been removed. Event loops with
class, module, package, and session scopes can be requested via the *scope*
keyword argument to the _asyncio_ mark.
- Introduces the *event_loop_policy* fixture which allows testing with
non-default or multiple event loops `#662
<https://github.com/pytest-dev/pytest-asyncio/pull/662>`_
- Introduces ``pytest_asyncio.is_async_test`` which returns whether a test
item is managed by pytest-asyncio `#376
<https://github.com/pytest-dev/pytest-asyncio/issues/376>`_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/pyproject.toml
new/pytest-asyncio-1.3.0/pyproject.toml
--- old/pytest-asyncio-1.2.0/pyproject.toml 2025-09-12 09:21:22.000000000
+0200
+++ new/pytest-asyncio-1.3.0/pyproject.toml 2025-11-10 16:49:48.000000000
+0100
@@ -20,14 +20,13 @@
authors = [
{ name = "Tin Tvrtković", email = "[email protected]" },
]
-requires-python = ">=3.9"
+requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
@@ -42,7 +41,7 @@
dependencies = [
"backports-asyncio-runner>=1.1,<2; python_version<'3.11'",
- "pytest>=8.2,<9",
+ "pytest>=8.2,<10",
"typing-extensions>=4.12; python_version<'3.13'",
]
optional-dependencies.docs = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/pytest_asyncio/plugin.py
new/pytest-asyncio-1.3.0/pytest_asyncio/plugin.py
--- old/pytest-asyncio-1.2.0/pytest_asyncio/plugin.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/pytest_asyncio/plugin.py 2025-11-10
16:49:48.000000000 +0100
@@ -16,6 +16,7 @@
from collections.abc import (
AsyncIterator,
Awaitable,
+ Callable,
Generator,
Iterable,
Iterator,
@@ -24,10 +25,9 @@
from types import AsyncGeneratorType, CoroutineType
from typing import (
Any,
- Callable,
Literal,
+ ParamSpec,
TypeVar,
- Union,
overload,
)
@@ -49,11 +49,6 @@
PytestPluginManager,
)
-if sys.version_info >= (3, 10):
- from typing import ParamSpec
-else:
- from typing_extensions import ParamSpec
-
if sys.version_info >= (3, 11):
from asyncio import Runner
else:
@@ -65,7 +60,7 @@
from typing_extensions import TypeIs
_ScopeName = Literal["session", "package", "module", "class", "function"]
-_R = TypeVar("_R", bound=Union[Awaitable[Any], AsyncIterator[Any]])
+_R = TypeVar("_R", bound=Awaitable[Any] | AsyncIterator[Any])
_P = ParamSpec("_P")
FixtureFunction = Callable[_P, _R]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/tests/hypothesis/test_base.py
new/pytest-asyncio-1.3.0/tests/hypothesis/test_base.py
--- old/pytest-asyncio-1.2.0/tests/hypothesis/test_base.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/hypothesis/test_base.py 2025-11-10
16:49:48.000000000 +0100
@@ -27,7 +27,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default")
result.assert_outcomes(passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_class_scope.py
new/pytest-asyncio-1.3.0/tests/markers/test_class_scope.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_class_scope.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_class_scope.py 2025-11-10
16:49:48.000000000 +0100
@@ -3,6 +3,7 @@
from __future__ import annotations
import asyncio
+import sys
from textwrap import dedent
import pytest
@@ -143,8 +144,15 @@
"""
)
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=3)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_respects_parametrized_loop_policies(
@@ -175,8 +183,15 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=2)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_provides_class_scoped_loop_to_fixtures(
@@ -205,7 +220,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -293,5 +308,5 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(warnings=0, passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_function_scope.py
new/pytest-asyncio-1.3.0/tests/markers/test_function_scope.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_function_scope.py
2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_function_scope.py
2025-11-10 16:49:48.000000000 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import sys
from textwrap import dedent
from pytest import Pytester
@@ -87,7 +88,7 @@
"""
)
)
- result = pytester.runpytest("--asyncio-mode=strict", "--assert=plain")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W", "default")
result.assert_outcomes(passed=1, warnings=1)
result.stdout.fnmatch_lines("*DeprecationWarning*")
@@ -119,8 +120,15 @@
"""
),
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=1)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=1, warnings=2)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=1)
def test_asyncio_mark_respects_parametrized_loop_policies(
@@ -157,8 +165,15 @@
"""
)
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=3)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_provides_function_scoped_loop_to_fixtures(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_invalid_arguments.py
new/pytest-asyncio-1.3.0/tests/markers/test_invalid_arguments.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_invalid_arguments.py
2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_invalid_arguments.py
2025-11-10 16:49:48.000000000 +0100
@@ -8,6 +8,7 @@
def test_no_error_when_scope_passed_as_sole_keyword_argument(
pytester: pytest.Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -19,7 +20,7 @@
"""
)
)
- result = pytester.runpytest_subprocess()
+ result = pytester.runpytest("--assert=plain")
result.assert_outcomes(passed=1)
result.stdout.no_fnmatch_line("*ValueError*")
@@ -27,6 +28,7 @@
def test_error_when_scope_passed_as_positional_argument(
pytester: pytest.Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -38,7 +40,7 @@
"""
)
)
- result = pytester.runpytest_subprocess()
+ result = pytester.runpytest("--assert=plain")
result.assert_outcomes(errors=1)
result.stdout.fnmatch_lines(
["*ValueError: mark.asyncio accepts only a keyword argument*"]
@@ -48,6 +50,7 @@
def test_error_when_wrong_keyword_argument_is_passed(
pytester: pytest.Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -59,7 +62,7 @@
"""
)
)
- result = pytester.runpytest_subprocess()
+ result = pytester.runpytest("--assert=plain")
result.assert_outcomes(errors=1)
result.stdout.fnmatch_lines(
["*ValueError: mark.asyncio accepts only a keyword argument
'loop_scope'*"]
@@ -69,6 +72,7 @@
def test_error_when_additional_keyword_arguments_are_passed(
pytester: pytest.Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -80,7 +84,7 @@
"""
)
)
- result = pytester.runpytest_subprocess()
+ result = pytester.runpytest("--assert=plain")
result.assert_outcomes(errors=1)
result.stdout.fnmatch_lines(
["*ValueError: mark.asyncio accepts only a keyword argument*"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_module_scope.py
new/pytest-asyncio-1.3.0/tests/markers/test_module_scope.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_module_scope.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_module_scope.py 2025-11-10
16:49:48.000000000 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import sys
from textwrap import dedent
from pytest import Pytester
@@ -87,8 +88,15 @@
"""
),
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=3)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_respects_parametrized_loop_policies(
@@ -119,8 +127,15 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=2)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_provides_module_scoped_loop_to_fixtures(
@@ -150,7 +165,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -298,5 +313,5 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(warnings=0, passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_package_scope.py
new/pytest-asyncio-1.3.0/tests/markers/test_package_scope.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_package_scope.py
2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_package_scope.py
2025-11-10 16:49:48.000000000 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import sys
from textwrap import dedent
from pytest import Pytester
@@ -127,8 +128,15 @@
"""
),
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=3)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_respects_parametrized_loop_policies(
@@ -160,8 +168,15 @@
"""
),
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=2)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_provides_package_scoped_loop_to_fixtures(
@@ -207,7 +222,7 @@
"""
),
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/markers/test_session_scope.py
new/pytest-asyncio-1.3.0/tests/markers/test_session_scope.py
--- old/pytest-asyncio-1.2.0/tests/markers/test_session_scope.py
2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/markers/test_session_scope.py
2025-11-10 16:49:48.000000000 +0100
@@ -1,5 +1,6 @@
from __future__ import annotations
+import sys
from textwrap import dedent
from pytest import Pytester
@@ -128,8 +129,15 @@
"""
),
)
- result = pytester.runpytest("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=3)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_respects_parametrized_loop_policies(
@@ -161,8 +169,15 @@
"""
),
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
+ pytest_args = ["--asyncio-mode=strict"]
+ if sys.version_info >= (3, 14):
+ pytest_args.extend(["-W", "default"])
+ result = pytester.runpytest(*pytest_args)
+ if sys.version_info >= (3, 14):
+ result.assert_outcomes(passed=2, warnings=2)
+ result.stdout.fnmatch_lines("*DefaultEventLoopPolicy*")
+ else:
+ result.assert_outcomes(passed=2)
def test_asyncio_mark_provides_session_scoped_loop_to_fixtures(
@@ -212,7 +227,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -423,5 +438,5 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(warnings=0, passed=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/tests/modes/test_strict_mode.py
new/pytest-asyncio-1.3.0/tests/modes/test_strict_mode.py
--- old/pytest-asyncio-1.2.0/tests/modes/test_strict_mode.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/modes/test_strict_mode.py 2025-11-10
16:49:48.000000000 +0100
@@ -94,7 +94,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
if pytest_version >= (8, 4, 0):
result.assert_outcomes(failed=1, skipped=0, warnings=0)
else:
@@ -119,7 +119,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
if pytest_version >= (8, 4, 0):
result.assert_outcomes(failed=1, skipped=0, warnings=2)
@@ -155,7 +155,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
if pytest_version >= (8, 4, 0):
result.assert_outcomes(passed=1, failed=0, skipped=0, warnings=2)
else:
@@ -202,7 +202,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
if pytest_version >= (8, 4, 0):
result.assert_outcomes(passed=1, warnings=2)
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/tests/test_asyncio_mark.py
new/pytest-asyncio-1.3.0/tests/test_asyncio_mark.py
--- old/pytest-asyncio-1.2.0/tests/test_asyncio_mark.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/test_asyncio_mark.py 2025-11-10
16:49:48.000000000 +0100
@@ -6,6 +6,7 @@
def test_asyncio_mark_on_sync_function_emits_warning(pytester: Pytester):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -17,7 +18,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
result.assert_outcomes(passed=1)
result.stdout.fnmatch_lines(
["*is marked with '@pytest.mark.asyncio' but it is not an async
function.*"]
@@ -27,6 +28,7 @@
def test_asyncio_mark_on_async_generator_function_emits_warning_in_strict_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -38,7 +40,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
@@ -48,6 +50,7 @@
def test_asyncio_mark_on_async_generator_function_emits_warning_in_auto_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -56,7 +59,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=auto", "-W default")
+ result = pytester.runpytest("--asyncio-mode=auto", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
@@ -66,6 +69,7 @@
def test_asyncio_mark_on_async_generator_method_emits_warning_in_strict_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -78,7 +82,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
@@ -88,6 +92,7 @@
def test_asyncio_mark_on_async_generator_method_emits_warning_in_auto_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -98,7 +103,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=auto", "-W default")
+ result = pytester.runpytest("--asyncio-mode=auto", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
@@ -108,6 +113,7 @@
def
test_asyncio_mark_on_async_generator_staticmethod_emits_warning_in_strict_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -121,7 +127,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W
default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
@@ -131,6 +137,7 @@
def
test_asyncio_mark_on_async_generator_staticmethod_emits_warning_in_auto_mode(
pytester: Pytester,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
"""\
@@ -141,7 +148,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=auto", "-W default")
+ result = pytester.runpytest("--asyncio-mode=auto", "-W default",
"--assert=plain")
result.assert_outcomes(xfailed=1, warnings=1)
result.stdout.fnmatch_lines(
["*Tests based on asynchronous generators are not supported*"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/test_event_loop_fixture.py
new/pytest-asyncio-1.3.0/tests/test_event_loop_fixture.py
--- old/pytest-asyncio-1.2.0/tests/test_event_loop_fixture.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/test_event_loop_fixture.py 2025-11-10
16:49:48.000000000 +0100
@@ -5,56 +5,6 @@
from pytest import Pytester
-def test_event_loop_fixture_respects_event_loop_policy(pytester: Pytester):
- pytester.makeconftest(
- dedent(
- """\
- '''Defines and sets a custom event loop policy'''
- import asyncio
- from asyncio import DefaultEventLoopPolicy, SelectorEventLoop
-
- class TestEventLoop(SelectorEventLoop):
- pass
-
- class TestEventLoopPolicy(DefaultEventLoopPolicy):
- def new_event_loop(self):
- return TestEventLoop()
-
- # This statement represents a code which sets a custom event loop
policy
- asyncio.set_event_loop_policy(TestEventLoopPolicy())
- """
- )
- )
- pytester.makepyfile(
- dedent(
- """\
- '''Tests that any externally provided event loop policy remains
unaltered'''
- import asyncio
-
- import pytest
-
-
- @pytest.mark.asyncio
- async def test_uses_loop_provided_by_custom_policy():
- '''Asserts that test cases use the event loop
- provided by the custom event loop policy'''
- assert type(asyncio.get_event_loop()).__name__ ==
"TestEventLoop"
-
-
- @pytest.mark.asyncio
- async def test_custom_policy_is_not_overwritten():
- '''
- Asserts that any custom event loop policy stays the same
- across test cases.
- '''
- assert type(asyncio.get_event_loop()).__name__ ==
"TestEventLoop"
- """
- )
- )
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
- result.assert_outcomes(passed=2)
-
-
def test_event_loop_fixture_handles_unclosed_async_gen(
pytester: Pytester,
):
@@ -78,7 +28,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W",
"default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W", "default")
result.assert_outcomes(passed=1, warnings=0)
@@ -110,7 +60,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest_subprocess("--asyncio-mode=strict",
"--assert=plain")
result.assert_outcomes(passed=1, warnings=1)
result.stdout.fnmatch_lines(
["*An exception occurred during teardown of an asyncio.Runner*"]
@@ -139,5 +89,5 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W",
"default")
+ result = pytester.runpytest("--asyncio-mode=strict", "-W", "default")
result.assert_outcomes(passed=1, warnings=1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-asyncio-1.2.0/tests/test_fixture_loop_scopes.py
new/pytest-asyncio-1.3.0/tests/test_fixture_loop_scopes.py
--- old/pytest-asyncio-1.2.0/tests/test_fixture_loop_scopes.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/test_fixture_loop_scopes.py 2025-11-10
16:49:48.000000000 +0100
@@ -13,6 +13,7 @@
pytester: Pytester,
fixture_scope: str,
):
+ pytester.makeini("[pytest]\nasyncio_default_fixture_loop_scope = function")
pytester.makepyfile(
dedent(
f"""\
@@ -34,7 +35,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -68,7 +69,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -101,7 +102,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -134,7 +135,7 @@
"""
),
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=1)
@@ -145,7 +146,7 @@
asyncio_default_fixture_loop_scope = invalid_scope
"""
)
- result = pytester.runpytest()
+ result = pytester.runpytest("--assert=plain")
result.stderr.fnmatch_lines(
[
"ERROR: 'invalid_scope' is not a valid "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/tests/test_set_event_loop.py
new/pytest-asyncio-1.3.0/tests/test_set_event_loop.py
--- old/pytest-asyncio-1.2.0/tests/test_set_event_loop.py 2025-09-12
09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tests/test_set_event_loop.py 2025-11-10
16:49:48.000000000 +0100
@@ -173,7 +173,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=3)
@@ -252,7 +252,7 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=3)
@@ -367,5 +367,5 @@
"""
)
)
- result = pytester.runpytest_subprocess("--asyncio-mode=strict")
+ result = pytester.runpytest("--asyncio-mode=strict")
result.assert_outcomes(passed=5)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-asyncio-1.2.0/tox.ini
new/pytest-asyncio-1.3.0/tox.ini
--- old/pytest-asyncio-1.2.0/tox.ini 2025-09-12 09:21:22.000000000 +0200
+++ new/pytest-asyncio-1.3.0/tox.ini 2025-11-10 16:49:48.000000000 +0100
@@ -1,6 +1,6 @@
[tox]
minversion = 4.28.0
-envlist = build, py39, py310, py311, py312, py313, py314, pytest-min, docs,
pyright
+envlist = build, py310, py311, py312, py313, py314, pytest-min, docs, pyright
isolated_build = true
passenv =
CI
@@ -90,8 +90,7 @@
[gh-actions]
python =
- 3.9: py39, pytest-min, build
- 3.10: py310
+ 3.10: py310, pytest-min, build
3.11: py311
3.12: py312
3.13: py313, pyright