Skip to content

Implement is_unsatisfiable on SpecifierSet using intervals#1119

Draft
notatallshaw wants to merge 2 commits intopypa:mainfrom
notatallshaw:is-unsatisfiable/is_unsatisfiable
Draft

Implement is_unsatisfiable on SpecifierSet using intervals#1119
notatallshaw wants to merge 2 commits intopypa:mainfrom
notatallshaw:is-unsatisfiable/is_unsatisfiable

Conversation

@notatallshaw
Copy link
Member

Fixes #940
Fixes #306

This uses intervals that re-implement PEP 440 logic, the plan is to move the entire specifier machinery to use intervals, but that will be in a follow up PR. This approach focuses on relative simplicity, given that choice, and is not micro-optimized.

There are some edge cases around === that need to still be decided on, as this PR implements something closer to the specification than packaging quite implements (see #978 and #766), I will create a follow up PR to make that choice directly.

PR still needs a little clean up, so I will leave in draft for now and comment when ready for review.

@notatallshaw notatallshaw force-pushed the is-unsatisfiable/is_unsatisfiable branch from 5df83c0 to 8aabbca Compare March 15, 2026 01:06
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.

Add an unsatisfiability check method to SpecifierSet Check for SpecifierSet syntactic consistency

1 participant