Skip to content

Correct PythonInputProvider._iter_matches to fix tests with packaging 26.0#201

Merged
notatallshaw merged 1 commit intosarugaku:mainfrom
notatallshaw:fix-tests-packaging-26.0
Feb 13, 2026
Merged

Correct PythonInputProvider._iter_matches to fix tests with packaging 26.0#201
notatallshaw merged 1 commit intosarugaku:mainfrom
notatallshaw:fix-tests-packaging-26.0

Conversation

@notatallshaw
Copy link
Collaborator

@notatallshaw notatallshaw commented Feb 12, 2026

Fixes #200

PythonInputProvider._iter_matches is implemented wrong, you need to iterate though all versions excluding incomparable versions, and then apply the combined SpecifierSet in one go, this allows SpecifierSet to apply the full PEP 440 logic to all available versions.

This may be able to be simplified when packaging 26.1 comes out because there will be a key parameter to filter, allowing to filter candidates or requirements directly: pypa/packaging#1066

@notatallshaw notatallshaw force-pushed the fix-tests-packaging-26.0 branch from ec5c4e1 to 5629c5f Compare February 12, 2026 04:26
@notatallshaw notatallshaw merged commit 017d3a7 into sarugaku:main Feb 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests compatibility with packaging 26.0

1 participant