Skip to content

stubs release fix #10434

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

Closed
wants to merge 1 commit into from
Closed

stubs release fix #10434

wants to merge 1 commit into from

Conversation

FoamyGuy
Copy link
Collaborator

I think this should fix #10361

python -msetuptools_scm returns a full version string which seems to include some hex hashes and a dev number i.e. 10.0.0a8.dev3+g25132775c1.d20250618, but pypi does not like all of this being included in the name when we attempt to upload it for stubs release.

This change uses cut to omit the 3rd period and anything that follows it, so we end up with a value like 10.0.0a8 which matches how the versions used to be the last time this succeeded with alpha4.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right fix. The stubs version error from the 10.0.0-alpha.7 release build is here:https://github.com/adafruit/circuitpython/actions/runs/15716969701/job/44296628261#step:13:42, and excerpted below.

Note that the version number is already 10.0.0a8.dev0, even though this is exactly 10.0.0-alpha.7. We haven't gotten to alpha.8 (a8) yet.

I think the new logic in #10312 (or maybe it's something else), is not converting the current tag properly. It would probably be worth looking at the old way the filename was generated when alpha.4 was released to see what the difference is. I don't think it should be necessary to reparse the version number from Python style to semver style. It should be generated properly. Maybe it's something in the PyPi stuff we use to build the PyPi release.

un # python -m build was run by 'make stubs'
17
Uploading dev release to PyPi
18
Uploading distributions to https://upload.pypi.org/legacy/
19
Uploading 
20
circuitpython_stubs-10.0.0a8.dev0+gc5128a9902.d20250617-py3-none-any.whl
21
[...
]100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB • 00:00 • 4.2 MB/s
35
25hWARNING  Error during upload. Retry with the --verbose option for more details. 
36
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/        
37
         The use of local versions in                                           
38
         <Version('10.0.0a8.dev0+gc5128a9902.d20250617')> is not allowed. See   
39
         https://packaging.python.org/specifications/core-metadata for more     
40
         information.                    

@FoamyGuy FoamyGuy closed this Jun 18, 2025
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

Successfully merging this pull request may close these issues.

PyPi upload version on new release build has wrong version
2 participants