Skip to content
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] 51.1 version released as v51.1.0.post20201221 #2500

Closed
webknjaz opened this issue Dec 21, 2020 · 5 comments
Closed

[BUG] 51.1 version released as v51.1.0.post20201221 #2500

webknjaz opened this issue Dec 21, 2020 · 5 comments

Comments

@webknjaz
Copy link
Member

@jaraco I noticed that there's a release on PyPI but no tag on GitHub. Could you please push it?

@jaraco
Copy link
Member

jaraco commented Dec 21, 2020

Thanks for reporting. I noticed this last night and was about to file a report when I saw this one. The version in the release is a mistake.

@jaraco jaraco changed the title [BUG] v51.1.0.post20201221 is untagged [BUG] 51.1 version released as v51.1.0.post20201221 Dec 21, 2020
@jaraco
Copy link
Member

jaraco commented Dec 21, 2020

The issue here is that setuptools uses this config section to tag builds with '.post' and the current date such that everything but the official release has some indication that it's not the official release. Prior to #2486, setuptools provided a separate 'release' command for cutting the official release without those tags. I don't believe it's possible for a PEP 517 build to provide that sort of customization.

Most other projects avoid this situation by not caring and just leaving every release to re-use the same version as official releases despite not having the same code. Other projects use setuptools_scm to generate a version based on git metadata so provide tags to the version to indicate their distance to the last tagged release.

I don't think setuptools can use setuptools_scm. At least, I'm not confident it can without problems, so I'm first going to remove that config section and once again cut 51.1.0 and remove 51.1.0.post from PyPI.

@jaraco
Copy link
Member

jaraco commented Dec 21, 2020

On further consideration, it looks like it may be possible to just-in-time re-write the cfg file to remove those settings:

diff --git a/tox.ini b/tox.ini
index 517dd4d90..9680ec010 100644
--- a/tox.ini
+++ b/tox.ini
@@ -68,6 +68,8 @@ setenv =
 commands =
 	python -m bootstrap
 	python -c "import path; path.Path('dist').rmtree_p()"
+	# unset tag_build and tag_date pypa/setuptools#2500
+	python setup.py egg_info -Db "" saveopts
 	python -m pep517.build .
 	python -m twine upload dist/*
 	python -m jaraco.develop.create-github-release

This approach brings the behavior back in line to where it was before, with the biggest exception being that the setup.cfg file in the release will never match what's in the tagged commit. But I guess that's an acceptable limitation until the build tooling gets better.

@jaraco jaraco closed this as completed in dfd1552 Dec 21, 2020
@jaraco
Copy link
Member

jaraco commented Dec 21, 2020

I've re-tagged dfd1552 as v51.1.0. Now I'll use the yank feature to yank the post release.

@jaraco
Copy link
Member

jaraco commented Dec 21, 2020

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants