Imported Upstream version 63.4.1 upstream/63.4.1
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:52 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:52 +0000 (17:02 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/_distutils/command/bdist.py

index 4cb714539ab0c237386afa90017414cb4b75f0c8..f462bfadee8e80fe535d1c00354f8e7ae5ae544d 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 63.4.0
+current_version = 63.4.1
 commit = True
 tag = True
 
index 6b58d06a6ccaef736de99c00638a188e5eaf3f2c..eca0fc0562e95e12dc3bdca80dad583f476868a8 100644 (file)
@@ -1,3 +1,12 @@
+v63.4.1
+-------
+
+
+Misc
+^^^^
+* #3482: Sync with pypa/distutils@274758f1c02048d295efdbc13d2f88d9923547f8, restoring compatibility shim in bdist.format_commands.
+
+
 v63.4.0
 -------
 
@@ -5,7 +14,6 @@ v63.4.0
 Changes
 ^^^^^^^
 * #2971: ``upload_docs`` command is deprecated once again.
-* #3475: Merge with pypa/distutils@129480b, including substantial delinting and cleanup, some refactoring around compiler logic, better messaging in cygwincompiler (pypa/distutils#161).
 
 Documentation changes
 ^^^^^^^^^^^^^^^^^^^^^
@@ -25,11 +33,6 @@ v63.3.0
 
 Changes
 ^^^^^^^
-* #3460: <<<<<<< HEAD
-  Limit the scope of the _distutils_hack workaround for pip.
-  =======
-  Remove the pip workaround in _distutils_hack.
-  >>>>>>> 46344cf0 (Remove pip workaround in _distutils_hack.)
 * #3475: Merge with pypa/distutils@129480b, including substantial delinting and cleanup, some refactoring around compiler logic, better messaging in cygwincompiler (pypa/distutils#161).
 
 
index 736ca91b430e83bb83b27b92a26cb69b732588a0..5f6b9a54531ac4783bb6e8ace4b73d2ef3e3badb 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = setuptools
-version = 63.4.0
+version = 63.4.1
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
 description = Easily download, build, install, upgrade, and uninstall Python packages
index 4af1b8e668678845ce57f3848cc64c41a7bb24af..c9fdbf131ced399fdae9cd337875a699f40a9afd 100644 (file)
@@ -4,6 +4,8 @@ Implements the Distutils 'bdist' command (create a built [binary]
 distribution)."""
 
 import os
+import warnings
+
 from distutils.core import Command
 from distutils.errors import DistutilsPlatformError, DistutilsOptionError
 from distutils.util import get_platform
@@ -20,6 +22,16 @@ def show_formats():
     pretty_printer.print_help("List of available distribution formats:")
 
 
+class ListCompat(dict):
+    # adapter to allow for Setuptools compatibility in format_commands
+    def append(self, item):
+        warnings.warn(
+            """format_commands is now a dict. append is deprecated.""",
+            DeprecationWarning,
+            stacklevel=2,
+        )
+
+
 class bdist(Command):
 
     description = "create a built (binary) distribution"
@@ -65,18 +77,23 @@ class bdist(Command):
     default_format = {'posix': 'gztar', 'nt': 'zip'}
 
     # Define commands in preferred order for the --help-formats option
-    format_commands = dict(
-        rpm=('bdist_rpm', "RPM distribution"),
-        gztar=('bdist_dumb', "gzip'ed tar file"),
-        bztar=('bdist_dumb', "bzip2'ed tar file"),
-        xztar=('bdist_dumb', "xz'ed tar file"),
-        ztar=('bdist_dumb', "compressed tar file"),
-        tar=('bdist_dumb', "tar file"),
-        wininst=('bdist_wininst', "Windows executable installer"),
-        zip=('bdist_dumb', "ZIP file"),
-        msi=('bdist_msi', "Microsoft Installer"),
+    format_commands = ListCompat(
+        {
+            'rpm': ('bdist_rpm', "RPM distribution"),
+            'gztar': ('bdist_dumb', "gzip'ed tar file"),
+            'bztar': ('bdist_dumb', "bzip2'ed tar file"),
+            'xztar': ('bdist_dumb', "xz'ed tar file"),
+            'ztar': ('bdist_dumb', "compressed tar file"),
+            'tar': ('bdist_dumb', "tar file"),
+            'wininst': ('bdist_wininst', "Windows executable installer"),
+            'zip': ('bdist_dumb', "ZIP file"),
+            'msi': ('bdist_msi', "Microsoft Installer"),
+        }
     )
 
+    # for compatibility until consumers only reference format_commands
+    format_command = format_commands
+
     def initialize_options(self):
         self.bdist_base = None
         self.plat_name = None