File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ def test_package_signed_name_is_correct():
121
121
(string .digits , string .digits ),
122
122
(string .punctuation , "-.-" ),
123
123
("mosaik.SimConfig" , "mosaik.SimConfig" ),
124
+ ("package_name" , "package_name" ),
124
125
("mosaik$$$$.SimConfig" , "mosaik-.SimConfig" ),
125
126
],
126
127
)
Original file line number Diff line number Diff line change 51
51
def _safe_name (name : str ) -> str :
52
52
"""Convert an arbitrary string to a standard distribution name.
53
53
54
- Any runs of non-alphanumeric/. characters are replaced with a single '-'.
54
+ Any runs of non-alphanumeric/./_ characters are replaced with a single '-'.
55
55
56
56
Copied from pkg_resources.safe_name for compatibility with warehouse.
57
57
See https://github.com/pypa/twine/issues/743.
58
58
"""
59
- return re .sub ("[^A-Za-z0-9.]+" , "-" , name )
59
+ return re .sub ("[^A-Za-z0-9._ ]+" , "-" , name )
60
60
61
61
62
62
class PackageFile :
You can’t perform that action at this time.
0 commit comments