-
Notifications
You must be signed in to change notification settings - Fork 90
Invalid dev
version identifiers in setup.py
#504
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
Comments
PEP 440 does allow the following: While this may not be considered best practice, I believe upper bounds exist to avoid running into compatibility issues with breaking changes introduced by another package. If there's an upper bound, we'll have done it intentionally to ensure users aren't experiencing broken packages based on their environment. Did something break and/or did you run into an unexpected case where the current system has caused an issue for you? |
Yes, a packaging tool that used distlib failed to parse the requirements:
As I understand it, distlib is supposed to be a common reference implementation for python packaging tools and a candidate for replacing packaging in the Python standard library. I kinda (worgnly) interpreted this part of PEP 400:
as mandating the dot and number in |
Only specifying Seems like you're running distlib directly - could you let me know of other situations where you've run into this issue? Normal imports through pip should be fine, just trying to understand your workflow and how you've encountered the issue other than directly using this util class from |
Except that pip and most package tools do not consider pre-releases, unless the user explicitly specifies to use them. Which is the wanted behavior by the PyPA. But I agree, better safe than sorry in that regard and keep the dev. But having the upper bound on package versions at all, severely limits the ability for dependent projects to specify their dependencies, which is why most projects do not specify them and rather have a lock file or But back to the practical things: Is there a case you are worried about, where |
For the context of |
Match upstream as discussed at: googleapis/python-api-core#504
<2.0dev
isnota valid version matcher in the sense of PEP 440.(Edit: it is after all valid, just hidden in the specification, and distlib doesn't parse it)
It is also considered bad practice to have an upper bound on package versions and installers like pip do not typically consider development versions in any case (unless explicitly told to).
See: googleapis/google-api-python-client#2151
The text was updated successfully, but these errors were encountered: