-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
2.3.1.post1.dev1 is not newer then 2.3.1 #7585
Comments
I managed to create a post-release without
After publishing
|
Any |
Does it also work with |
It would look like
or
with a requirements.txt like
|
To clarify, pip does correctly treat 2.3.1.post1.dev1 as newer than 2.3.1 (so the issue title is inaccurate). The problem here is that pip is not selecting the (newer) dev1 version with |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
Environment
Description
I'm patching packages from Sphinx core, because the developers don't want to add these updates. I created a Git repository on GitHub and my own package namespace for the patched variations. For tagging I use the original version number with postfix
2.3.1.postN
to create post-releases. Development versions of such post-releases are tagged additionally with.devN
like2.3.1.post1.dev1
.(Other version postfixes for releases after
2.3.1
are not accepted by PyPI due to rules in PEP440.)To summarize:
2.3.1
- commit with original code based on Sphinx2.3.1
2.3.1.post1.dev1
- code based on2.3.1
for development towards2.3.1.post1
2.3.1.post1
- code based on2.3.1
with my patchesI packages and pushed this to PyPI.
Next, I changed my
requirements.txt
file and added:According to PEP440, section post-releases, a post-release is newer than a release.
But

pip
reports differently:(See below for a non-screenshot version.)
I looks like version postfixes like
.postN
and.devN
are not handled correctly in relational operators.Expected behavior
pip
should accept post-releases as newer version than an ordinary release.How to Reproduce
pip install -U btd.sphinx.inheritance-diagram
Output
The text was updated successfully, but these errors were encountered: