Repository navigation
Pass lists instead of itertools.product iterators to parametrize - #297
Merged
Merged
Conversation
pytest 9.1 deprecated iterators as parametrize argument values, and pytest 10 turns the PytestRemovedIn10Warning into an error, which stops test collection. The call for test_threaded_write is left to pycompression#294, which changes the line after it.
ptweezy
added a commit
to ptweezy/python-isal
that referenced
this pull request
Oct 24, 2026
pytest 10 turns the PytestRemovedIn10Warning for iterators into an error. pycompression#297 changes the other calls, but this decorator is next to the line that the previous commit changes.
1 of 2 tasks
Collaborator
|
I wonder why pytest simply did not call |
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.
pytest 9.1 deprecated passing an iterator, such as
itertools.product(...), as the argument values ofparametrize. These calls cause 17 of the 19 warnings on most CI jobs:pytest 10.0.0 turns this warning into an error. The filter is already in pytest's source, commented out with "To be enabled in pytest 10.0.0". With that filter (
-W error::pytest.PytestRemovedIn10Warning), pytest cannot collecttests/test_compat.py,tests/test_igzip_lib.py, andtests/test_igzip_threaded.py, and it runs no tests at all. CI installs pytest without a version, so every test job would fail when pytest 10.0.0 is released.This PR wraps 16 of the 17 calls in
list(). The call fortest_threaded_writeis in #294, because that PR changes the next line. The collected tests and their IDs do not change.This PR changes only tests, so it has no CHANGELOG entry.
Checklist