From df45427cbb67c1149fcf5d2d1e2705e69b3baf0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Apr 2024 09:10:21 -0400 Subject: [PATCH 1/3] Remove attempt to canonicalize the version. It's already canonical enough. Closes #4302 Closes #3593 --- newsfragments/4302.bugfix.rst | 1 + setuptools/_core_metadata.py | 4 ++-- setuptools/tests/test_config_discovery.py | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 newsfragments/4302.bugfix.rst diff --git a/newsfragments/4302.bugfix.rst b/newsfragments/4302.bugfix.rst new file mode 100644 index 0000000000..666549bcab --- /dev/null +++ b/newsfragments/4302.bugfix.rst @@ -0,0 +1 @@ +Remove attempt to canonicalize the version. It's already canonical enough. \ No newline at end of file diff --git a/setuptools/_core_metadata.py b/setuptools/_core_metadata.py index d8732c49bb..9b4f38ded2 100644 --- a/setuptools/_core_metadata.py +++ b/setuptools/_core_metadata.py @@ -17,7 +17,7 @@ from . import _normalization, _reqs from .extern.packaging.markers import Marker from .extern.packaging.requirements import Requirement -from .extern.packaging.utils import canonicalize_name, canonicalize_version +from .extern.packaging.utils import canonicalize_name from .extern.packaging.version import Version from .warnings import SetuptoolsDeprecationWarning @@ -264,5 +264,5 @@ def _write_provides_extra(file, processed_extras, safe, unsafe): def get_fullname(self): return "{}-{}".format( canonicalize_name(self.get_name()).replace('-', '_'), - canonicalize_version(self.get_version()), + self.get_version(), ) diff --git a/setuptools/tests/test_config_discovery.py b/setuptools/tests/test_config_discovery.py index e1e67ffe11..ff9e672b68 100644 --- a/setuptools/tests/test_config_discovery.py +++ b/setuptools/tests/test_config_discovery.py @@ -255,7 +255,7 @@ def test_py_modules_when_wheel_dir_is_cwd(self, tmp_path): class TestNoConfig: - CANONICAL_DEFAULT_VERSION = "0" # Canonical default version given by setuptools + DEFAULT_VERSION = "0.0.0" # Default version given by setuptools EXAMPLES = { "pkg1": ["src/pkg1.py"], @@ -277,9 +277,7 @@ def test_build_with_discovered_name(self, tmp_path): _populate_project_dir(tmp_path, files, {}) _run_build(tmp_path, "--sdist") # Expected distribution file - dist_file = ( - tmp_path / f"dist/ns_nested_pkg-{self.CANONICAL_DEFAULT_VERSION}.tar.gz" - ) + dist_file = tmp_path / f"dist/ns_nested_pkg-{self.DEFAULT_VERSION}.tar.gz" assert dist_file.is_file() From 5fc21f6bda88648c021e45d6e7e5e5229293d561 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Apr 2024 09:13:00 -0400 Subject: [PATCH 2/3] =?UTF-8?q?Bump=20version:=2069.3.0=20=E2=86=92=2069.3?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- NEWS.rst | 9 +++++++++ newsfragments/4302.bugfix.rst | 1 - setup.cfg | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 newsfragments/4302.bugfix.rst diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a76d5b66d7..d9cfd1ad7c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 69.3.0 +current_version = 69.3.1 commit = True tag = True diff --git a/NEWS.rst b/NEWS.rst index 7822ec6325..8a45a961eb 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,12 @@ +v69.3.1 +======= + +Bugfixes +-------- + +- Remove attempt to canonicalize the version. It's already canonical enough. (#4302) + + v69.3.0 ======= diff --git a/newsfragments/4302.bugfix.rst b/newsfragments/4302.bugfix.rst deleted file mode 100644 index 666549bcab..0000000000 --- a/newsfragments/4302.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Remove attempt to canonicalize the version. It's already canonical enough. \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index bab3efa52c..78b9166b85 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 69.3.0 +version = 69.3.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages From d4affe01ceb1fa4ed4c51f21473dd4c77d764d70 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 13 Apr 2024 09:17:42 -0400 Subject: [PATCH 3/3] =?UTF-8?q?Bump=20version:=2069.4.0=20=E2=86=92=2069.4?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- NEWS.rst | 6 ++++++ setup.cfg | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 007a8ec0f5..09a7b690f0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 69.4.0 +current_version = 69.4.1 commit = True tag = True diff --git a/NEWS.rst b/NEWS.rst index e01087fc2f..fc213d160d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,9 @@ +v69.4.1 +======= + +No significant changes. + + v69.3.1 ======= diff --git a/setup.cfg b/setup.cfg index 02078f7466..a579bf5ff7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 69.4.0 +version = 69.4.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages