astral-sh / packse

Python packaging scenarios
Apache License 2.0
93 stars 9 forks source link

Trying to understand "package-only-prereleases-boundary" scenario #161

Open notatallshaw opened 5 months ago

notatallshaw commented 5 months ago

This is the scenario: https://github.com/astral-sh/packse/blob/0.3.12/scenarios/prereleases.json#L520

In this scenario package a only has prereleases, but the specifier used is an exclusive specificier a<0.2.0, the spec says:

The exclusive ordered comparison <V MUST NOT allow a pre-release of the specified version unless the specified version is itself a pre-release. Allowing pre-releases that are earlier than, but not equal to a specific pre-release may be accomplished by using <V.rc1 or similar.

Now, I appreciate there are other parts of the spec that may be contradictory. So I'm not sure if this is an intentional design choice or not? But my understanding is the intent of the spec is it should not be allowed: https://github.com/pypa/packaging/issues/776#issuecomment-1900515985