Skip to content

Restore compatibility with pytest>=7.0,<7.2 #660

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 3 commits into from
Nov 8, 2023
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
1 change: 1 addition & 0 deletions dependencies/pytest-min/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ pytest==7.0.0
requests==2.28.1
sortedcontainers==2.4.0
tomli==2.0.1
trio==0.21.0
urllib3==1.26.12
xmlschema==2.1.1
4 changes: 4 additions & 0 deletions docs/source/reference/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Changelog
=========

0.22.1 (UNRELEASED)
===================
- Fixes a bug that broke compatibility with pytest>=7.0,<7.2. `#654 <https://github.com/pytest-dev/pytest-asyncio/pull/654>`_

0.22.0 (2023-10-31)
===================
- Class-scoped and module-scoped event loops can be requested
Expand Down
2 changes: 1 addition & 1 deletion pytest_asyncio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ def pytest_collectstart(collector: pytest.Collector):
return
# pytest.Collector.own_markers is empty at this point,
# so we rely on _pytest.mark.structures.get_unpacked_marks
marks = get_unpacked_marks(collector.obj, consider_mro=True)
marks = get_unpacked_marks(collector.obj)
for mark in marks:
if not mark.name == "asyncio_event_loop":
continue
Expand Down
14 changes: 8 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ passenv =

[testenv]
extras = testing
deps =
--requirement dependencies/default/requirements.txt
--constraint dependencies/default/constraints.txt
install_command = python -m pip install \
--requirement dependencies/default/requirements.txt \
--constraint dependencies/default/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make

[testenv:pytest-min]
extras = testing
deps =
--requirement dependencies/pytest-min/requirements.txt
--constraint dependencies/pytest-min/constraints.txt
install_command = python -m pip install \
--requirement dependencies/pytest-min/requirements.txt \
--constraint dependencies/pytest-min/constraints.txt \
{opts} {packages}
commands = make test
allowlist_externals =
make
Expand Down