-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot allow pre-/developmental releases in a Requirement #790
Comments
FYI I believe some important parts of the spec that related to this: https://packaging.python.org/en/latest/specifications/version-specifiers/#handling-of-pre-releases
I beleive in your list of four examples the second and third are bugs, due to the last part of this spec I quoted, I recently created an issue for it #788 |
You will have to do some code spelunking to find that out since the docstring for the abstract method is a decade old. But my guess is most people don't want to install pre-releases, so the defaults reflect that in a broad way without trying to be clever about detecting on using pre-releases on both sides and assuming that's on purpose.
What would you expect that to do? propagate through |
I recently hit the following unexpected behavior with
packaging
:I took a look at the version string specification, and it seems to suggest that this should be valid.
Edit: It does make sense that packaging chooses to default to not treating pre-release and developmental releases as the latest version, as consumers of the project may prefer to only get stable releases. But I still wanted to raise this issue to ask about the rationale, and if it is possible to add a feature to Requirement to allow pre-releases in the same way that SpecifierSets have
prereleases=True
.I noticed that the documentation say that
prereleases=None
(the default) has different behavior thanprereleases=False
, but I can't seem to find more information on it. These results are quite unexpected to me (the first one makes sense after some thought, the second and third I would expect to be true, and the fourth makes sense but I'm not sure why the >= is necessary):The text was updated successfully, but these errors were encountered: