-
Notifications
You must be signed in to change notification settings - Fork 158
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
fix compatibility with pytest ^8 #776
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #776 +/- ##
==========================================
+ Coverage 94.33% 94.96% +0.62%
==========================================
Files 2 2
Lines 477 477
Branches 95 95
==========================================
+ Hits 450 453 +3
+ Misses 17 15 -2
+ Partials 10 9 -1 ☔ View full report in Codecov by Sentry. |
Thanks for doing this! |
… and pytest-8.0.0rc2 from the excluded versions. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch!
I think some of the version changes are problematic. Other than that, the PR looks good.
If you don't mind, I'll adjust the version numbers myself and add a changelog entry. Maybe this allows us to get out a pre-release for pytest-asyncio with pytest 8 support today.
@@ -1,3 +1,3 @@ | |||
# Always adjust install_requires in setup.cfg and pytest-min-requirements.txt | |||
# when changing runtime dependencies | |||
pytest >= 7.0.0,<8 | |||
pytest >= 7.0.0, !=8.0.0rc1, !=8.0.0rc2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran your patch successfully against pytest-8.0.0rc1 and pytest-8.0.0rc2. This means there's not reason to exclude them in the compatible versions. It's more likely that #764 reduced the number of issues with the collection changes in pytest.
More importantly, we should try to keep the upper version bound at all costs, both in requirements.txt
and especially in setup.py
. Otherwise we assume that pytest-asyncio is compatible with potentially breaking changes in pytest 9.
@@ -14,7 +14,7 @@ packaging==23.2 | |||
pluggy==1.3.0 | |||
py==1.11.0 | |||
Pygments==2.16.1 | |||
pytest==7.0.0 | |||
pytest==8.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention of the pytest-min
environment is to test against an older version of pytest. This way, pytest-asyncio doesn't accidentally use any of the newer pytest features without a proper bump of the minimum supported version.
I think we should continue to support pytest 7 for at least a short period of time, in order to allow users to migrate pytest independently from pytest-asyncio.
This should allow users to update pytest independently from pytest-asyncio. Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
Signed-off-by: Michael Seifert <m.seifert@digitalernachschub.de>
fixes #737
pytest-asyncio is incompatible with pytest 8.0.0rc1 and 8.0.0rc2, but not with pytest 8.0.0. Although 2 tests had to be updated, as suggested here by @mgorny.