Skip to content

Commit dc2cafa

Browse files
robot-pigletKamil Khamitov
authored andcommitted
Intermediate changes
commit_hash:7e2cec68f101a9d3cfbac83ec922054c2ddfd0a4
1 parent 7f194d3 commit dc2cafa

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

contrib/python/setuptools/py3/.dist-info/METADATA

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.2
22
Name: setuptools
3-
Version: 75.8.0
3+
Version: 75.8.1
44
Summary: Easily download, build, install, upgrade, and uninstall Python packages
55
Author-email: Python Packaging Authority <distutils-sig@python.org>
66
Project-URL: Source, https://github.com/pypa/setuptools
@@ -98,7 +98,7 @@ Requires-Dist: jaraco.develop>=7.21; sys_platform != "cygwin" and extra == "type
9898
.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
9999
:target: https://setuptools.pypa.io
100100

101-
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2024-informational
101+
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2025-informational
102102
:target: https://blog.jaraco.com/skeleton
103103

104104
.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white

contrib/python/setuptools/py3/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
1515
:target: https://setuptools.pypa.io
1616

17-
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2024-informational
17+
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2025-informational
1818
:target: https://blog.jaraco.com/skeleton
1919

2020
.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white

contrib/python/setuptools/py3/setuptools/_normalization.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,13 @@ def filename_component_broken(value: str) -> str:
134134
def safer_name(value: str) -> str:
135135
"""Like ``safe_name`` but can be used as filename component for wheel"""
136136
# See bdist_wheel.safer_name
137-
return filename_component(safe_name(value))
137+
return (
138+
# Per https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
139+
re.sub(r"[-_.]+", "-", safe_name(value))
140+
.lower()
141+
# Per https://packaging.python.org/en/latest/specifications/binary-distribution-format/#escaping-and-unicode
142+
.replace("-", "_")
143+
)
138144

139145

140146
def safer_best_effort_version(value: str) -> str:

contrib/python/setuptools/py3/setuptools/command/bdist_wheel.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@
2323
from wheel.wheelfile import WheelFile
2424

2525
from .. import Command, __version__, _shutil
26+
from .._normalization import safer_name
2627
from ..warnings import SetuptoolsDeprecationWarning
2728
from .egg_info import egg_info as egg_info_cls
2829

2930
from distutils import log
3031

3132

32-
def safe_name(name: str) -> str:
33-
"""Convert an arbitrary string to a standard distribution name
34-
Any runs of non-alphanumeric/. characters are replaced with a single '-'.
35-
"""
36-
return re.sub("[^A-Za-z0-9.]+", "-", name)
37-
38-
3933
def safe_version(version: str) -> str:
4034
"""
4135
Convert an arbitrary string to a standard version string
@@ -133,10 +127,6 @@ def get_abi_tag() -> str | None:
133127
return abi
134128

135129

136-
def safer_name(name: str) -> str:
137-
return safe_name(name).replace("-", "_")
138-
139-
140130
def safer_version(version: str) -> str:
141131
return safe_version(version).replace("-", "_")
142132

@@ -294,7 +284,7 @@ def _validate_py_limited_api(self) -> None:
294284
raise ValueError(
295285
f"`py_limited_api={self.py_limited_api!r}` not supported. "
296286
"`Py_LIMITED_API` is currently incompatible with "
297-
f"`Py_GIL_DISABLED` ({sys.abiflags=!r}). "
287+
"`Py_GIL_DISABLED`."
298288
"See https://github.com/python/cpython/issues/111506."
299289
)
300290

contrib/python/setuptools/py3/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
PY3_LIBRARY()
44

5-
VERSION(75.8.0)
5+
VERSION(75.8.1)
66

77
LICENSE(MIT)
88

0 commit comments

Comments
 (0)