-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] tarball version suffix get trimmed #4302
Comments
cc: @jaraco |
Thanks for the report and sorry for the inconvenience. I think this is another case of "working as intended", based on PEP 625. Curiously, I can't find in the spec where it's indicated that trailing zeros are stripped, but that's the way the normalization is implemented. See #4300 where the same rationale applies. |
The |
See #3593 for the rationale behind this change. I do agree that it seems strange that the sdist filename doesn't match the internal name. That sounds like a bug. I'll follow up in that issue. |
Given bugs in the normalization logic, I would consider reverting these changes or yanking the release, until the bugs are addressed; otherwise we might have to pin to an older version of setuptools until fixes are available. |
Yes, that seems sensible. I've yanked the 69.3 and 69.4 releases. |
That's not what I'm seeing:
The version in the tarball matches the new, preferred, canonical version (as returned by It's true that the version of the tarball in GitHub is going to be different, but that's because the version is going to match the tags or release, which are out of scope for the PEP. Because the PEP specifies one thing but semver specifies another, it's not going to be possible for a project to keep them in sync. |
I'm releasing v69.3.1 and v69.4.1 with hotfixes for this issue. Version numbers will once again retain trailing zeros. |
You are right, the sdist tarball for 69.4(.0) is named properly. I'm sorry, I've got confused by the PyPI version which is 69.4.0 and this does not match the sdist. |
setuptools version
69.3.0 and above
Python version
Python 3.8
OS
Linux / macOS / windows
Additional environment information
No response
Description
Found in apache/beam#30955,
setuptools trim the version number of ".0" when tarball gets built
If the package version is
1.0.0
, now, it trimmed to1
.If the package version is
1.0.0.dev0
, now, it trimmed to1.dev0
Expected behavior
Version name should be consistent of that assigned to.
How to Reproduce
Here is a minimum setup.py
Prior to 69.3.0, run
python setup.py sdist
produces a tarball nameddist/dumb-project-1.0.0.tar.gz
, as expected. Now, it produces a tarball named `dist/dumb-project-1.tar.gzOutput
setuptools 69.2.0
setuptools 69.3.0:
The text was updated successfully, but these errors were encountered: