Non-tag releases to test.pypi.org fail #3

Closed
opened 2024-09-14 23:13:41 -06:00 by brendanhaines · 1 comment

wheel naming doesn't match standard python versioning except at tags.

For instance 2668a880ee results in a python package version of 0.1.dev1+g2668a88.
This name makes sense since the most recent tag is v0.1.0 so I would actually be quite happy with this naming however CI fails to upload this package to test.pypi.org with the following error:

Uploading distributions to https://test.pypi.org/legacy/
Uploading goat_monitor-0.1.dev1+g2668a88-py3-none-any.whl
WARNING  Error during upload. Retry with the --verbose option for more details. 
ERROR    HTTPError: 400 Bad Request from https://test.pypi.org/legacy/          
         The use of local versions in <Version('0.1.dev1+g2668a88')> is not     
         allowed. See https://packaging.python.org/specifications/core-metadata 
         for more information. 
wheel naming doesn't match standard python versioning except at tags. For instance 2668a880ee results in a python package version of `0.1.dev1+g2668a88`. This name makes sense since the most recent tag is [v0.1.0](https://git.brendanhaines.com/brendanhaines/goat_monitor/releases/tag/v0.1.0) so I would actually be quite happy with this naming however [CI fails to upload](https://git.brendanhaines.com/brendanhaines/goat_monitor/actions/runs/50/jobs/2) this package to test.pypi.org with the following error: ``` Uploading distributions to https://test.pypi.org/legacy/ Uploading goat_monitor-0.1.dev1+g2668a88-py3-none-any.whl WARNING Error during upload. Retry with the --verbose option for more details. ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/ The use of local versions in <Version('0.1.dev1+g2668a88')> is not allowed. See https://packaging.python.org/specifications/core-metadata for more information. ```
Author
Owner

I don't really want to mess with this naming. Yes, I could come up with my own way of denoting local versions that PyPi would tolerate but that's bypassing some intentional safeguards for PyPi. From what I've seen, the recommended way to handle this is either to not push to testpypi or use a devpi server instead which can accept local versions.

At the end of the day, I don't really need to use testpypi at all. I was only doing it because the guide told me how to and it seemed like a convenient way to always know that my pipelines are publishing properly.

Other people having this issue:
https://github.com/pypa/setuptools-scm/issues/322

More python publishing notes for gitea:
https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi-and-testpypi

I don't really want to mess with this naming. Yes, I could come up with my own way of denoting local versions that PyPi would tolerate but that's bypassing some intentional safeguards for PyPi. From what I've seen, the recommended way to handle this is either to not push to testpypi or use a devpi server instead which can accept local versions. At the end of the day, I don't really need to use testpypi at all. I was only doing it because the guide told me how to and it seemed like a convenient way to always know that my pipelines are publishing properly. Other people having this issue: https://github.com/pypa/setuptools-scm/issues/322 More python publishing notes for gitea: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi-and-testpypi
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: brendanhaines/goat_monitor#3
No description provided.