Skip to content

Commit c571ac6

Browse files
KN4CK3Rlunny
andauthored
Allow uppercase ASCII alphabet in PyPI package names (#21095) (#21217)
Backport of #21095 Co-authored-by: Lunny Xiao <[email protected]>
1 parent f663773 commit c571ac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/packages/pypi/pypi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
// https://www.python.org/dev/peps/pep-0503/#normalized-names
2626
var normalizer = strings.NewReplacer(".", "-", "_", "-")
27-
var nameMatcher = regexp.MustCompile(`\A[a-z0-9\.\-_]+\z`)
27+
var nameMatcher = regexp.MustCompile(`\A[a-zA-Z0-9\.\-_]+\z`)
2828

2929
// https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions
3030
var versionMatcher = regexp.MustCompile(`^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$`)

0 commit comments

Comments
 (0)