fix for Pytest 8 compat#17066
Merged
JelleZijlstra merged 2 commits intopython:masterfrom Mar 26, 2024
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Ideally the minimum version of pytest would be increased to 8.1 and then the following additional change would be included, otherwise mypy will fail its self-checks with Pytest 8.1+ --- mypy.orig/mypy/test/data.py
+++ mypy/mypy/test/data.py
@@ -640,9 +640,7 @@
# Non-None result means this obj is a test case.
# The collect method of the returned DataSuiteCollector instance will be called later,
# with self.obj being obj.
- return DataSuiteCollector.from_parent( # type: ignore[no-untyped-call]
- parent=collector, name=name
- )
+ return DataSuiteCollector.from_parent(parent=collector, name=name)
return None |
Member
|
You could bump our pinned version of pytest by running Though if bumping pytest to 8.0+ requires changes to the self-test, then we might want to raise the lower bound specified in |
Contributor
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
JelleZijlstra
approved these changes
Mar 26, 2024
Member
JelleZijlstra
left a comment
There was a problem hiding this comment.
Looks good, just waiting for CI to finish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Debian, we upgraded to pytest version 8.1.1+ for the next release.
pytest deprecated the name for the first positional argument to
pytest.failfrommsgtoreasonin Pytest 7.0 and removedmsgin Pytest 8.0https://docs.pytest.org/en/7.0.x/reference/reference.html#pytest-fail
https://docs.pytest.org/en/8.0.x/changelog.html#old-deprecations-are-now-errors