You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python packages with a character in uppercase cannot be uploaded in package registry.
eg : Pygments-2.13.0-py3-none-any.whl from pypi.org
or
PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl from pypi.org
lead to : 2022/09/01 08:57:24 ...ackages/pypi/pypi.go:34:func1() [T] [631057d4] plainTextInternal (status=400): invalid name or version
By changing the wheel file name and the name entry in METADATA file of the package by lowercase solve the issue.
could be related to :
routers/api/packages/pypi/pypi.go var nameMatcher = regexp.MustCompile('\A[a-z0-9\.\-_]+\z')
sorry for not being in a situation currently to provide a correct (and tested) pull request but I'll work on it in the future
Gitea Version
1.17.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.27.0
Operating System
RHEL8.5
How are you running Gitea?
official github 1.17.1 delivery
Database
MySQL
The text was updated successfully, but these errors were encountered:
As per PEP 426 the only valid characters in a name are the ASCII alphabet, ASCII numbers, ., -, and _. The name should be lowercased with all runs of the characters ., -, or _ replaced with a single - character.
I misinterpreted the last sentence, uppercase characters are fine. Will send a PR.
The PyPI name regexp is too restrictive and only permits lowercase characters. This PR adjusts the regexp to add in support for uppercase characters.
Fix#21014
The PyPI name regexp is too restrictive and only permits lowercase characters. This PR adjusts the regexp to add in support for uppercase characters.
Fixgo-gitea#21014
Description
Python packages with a character in uppercase cannot be uploaded in package registry.
eg : Pygments-2.13.0-py3-none-any.whl from pypi.org
or
PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl from pypi.org
lead to :
2022/09/01 08:57:24 ...ackages/pypi/pypi.go:34:func1() [T] [631057d4] plainTextInternal (status=400): invalid name or version
By changing the wheel file name and the name entry in METADATA file of the package by lowercase solve the issue.
could be related to :
routers/api/packages/pypi/pypi.go
var nameMatcher = regexp.MustCompile('\A[a-z0-9\.\-_]+\z')
sorry for not being in a situation currently to provide a correct (and tested) pull request but I'll work on it in the future
Gitea Version
1.17.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.27.0
Operating System
RHEL8.5
How are you running Gitea?
official github 1.17.1 delivery
Database
MySQL
The text was updated successfully, but these errors were encountered: