Imported Upstream version 58.3.0 upstream/58.3.0
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:36 +0000 (17:02 +0900)
16 files changed:
.bumpversion.cfg
.codecov.yml
CHANGES.rst
changelog.d/1988-change.rst [deleted file]
changelog.d/2785-change.rst [deleted file]
docs/userguide/declarative_config.rst
docs/userguide/distribution.rst
pytest.ini
setup.cfg
setuptools/__init__.py
setuptools/_distutils/tests/test_unixccompiler.py
setuptools/_distutils/unixccompiler.py
setuptools/_distutils/util.py
setuptools/command/easy_install.py
setuptools/command/install.py
setuptools/tests/test_virtualenv.py

index 0ed356322d40b67b02717d4efe00acd6b7eec8ac..57793568c128d437f6977fc54c3d2ac03f514521 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 58.2.0
+current_version = 58.3.0
 commit = True
 tag = True
 
index 69cb76019a474330e99666f147ecb85e44de1ce6..7510dfc65cdaee7737c905b9925889a8d663c74a 100644 (file)
@@ -1 +1,5 @@
 comment: false
+coverage:
+  status:
+    project:
+      threshold: 0.5%
index 0a002fe544f612fbbad422f78ed0325a0977a6f1..c8ecd1e5a8f90144a60be0dce65e05dd8f4cdf55 100644 (file)
@@ -1,3 +1,22 @@
+v58.3.0
+-------
+
+
+Changes
+^^^^^^^
+* #917: ``setup.py install`` and ``easy_install`` commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools.
+* #1988: Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead.
+  -- by :user:`hugovk`
+* #2785: Replace confirparser's readfp with read_file, deprecated since Python 3.2.
+  -- by :user:`hugovk`
+* #2823: Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption.
+
+Misc
+^^^^
+* #2762: Changed codecov.yml to configure the threshold to be lower
+  -- by :user:`tanvimoharir`
+
+
 v58.2.0
 -------
 
diff --git a/changelog.d/1988-change.rst b/changelog.d/1988-change.rst
deleted file mode 100644 (file)
index 4f10463..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Deprecated the ``bdist_rpm`` command. Binary packages should be built as wheels instead.
--- by :user:`hugovk`
diff --git a/changelog.d/2785-change.rst b/changelog.d/2785-change.rst
deleted file mode 100644 (file)
index 7e9631b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Replace confirparser's readfp with read_file, deprecated since Python 3.2.
--- by :user:`hugovk`
index c50fcf6d2bfba487549f4a60213b732996869a1e..abafe376843bea23c58ef55d442dc370a373ed12 100644 (file)
@@ -206,10 +206,10 @@ Options
 Key                      Type                                 Minimum Version Notes
 =======================  ===================================  =============== =========
 zip_safe                 bool
-setup_requires           list-semi
+setup_requires           list-semi                            36.7.0
 install_requires         list-semi
 extras_require           section                                              [#opt-2]_
-python_requires          str
+python_requires          str                                  34.4.0
 entry_points             file:, section                       51.0.0
 scripts                  list-comma
 eager_resources          list-comma
@@ -221,7 +221,7 @@ package_dir              dict
 package_data             section                                              [#opt-1]_
 exclude_package_data     section
 namespace_packages       list-comma
-py_modules               list-comma
+py_modules               list-comma                            34.4.0
 data_files               dict                                 40.6.0
 =======================  ===================================  =============== =========
 
index 19bed1f9d6ff498b72c0ca3e43230011b5b161d2..2872dacd6b97b9f36d552493bdbfb5402eed1d3c 100644 (file)
@@ -25,7 +25,7 @@ the command line ahead of the ``sdist`` or ``bdist`` commands that you want
 to generate a daily build or snapshot for.  See the section below on the
 :ref:`egg_info <egg_info>` command for more details.
 
-(Also, before you release your project, be sure to see the section above on
+(Also, before you release your project, be sure to see the section on
 :ref:`Specifying Your Project's Version` for more information about how pre- and
 post-release tags affect how version numbers are interpreted.  This is
 important in order to make sure that dependency processing tools will know
index eebb212f49577574bd2c1f945d9ca9d03a3f08e0..c7b62cc6577bece5acfb58197bb6794fd11ba6ab 100644 (file)
@@ -8,21 +8,28 @@ doctest_optionflags=ALLOW_UNICODE ELLIPSIS
 # workaround for warning pytest-dev/pytest#6178
 junit_family=xunit2
 filterwarnings=
-    # Fail on warnings
-    error
+       # Fail on warnings
+       error
 
-    ## upstream
+       ## upstream
        # Suppress deprecation warning in flake8
        ignore:SelectableGroups dict interface is deprecated::flake8
        # Suppress deprecation warning in pypa/packaging#433
        ignore:The distutils package is deprecated::packaging.tags
        ## end upstream
 
-    # https://github.com/pypa/setuptools/issues/1823
-    ignore:bdist_wininst command is deprecated
-    # Suppress this error; unimportant for CI tests
-    ignore:Extraction path is writable by group/others:UserWarning
-    # Suppress weird RuntimeWarning.
-    ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning
-    # Suppress use of bytes for filenames on Windows until fixed #2016
-    ignore:The Windows bytes API has been deprecated:DeprecationWarning
+       # https://github.com/pypa/setuptools/issues/1823
+       ignore:bdist_wininst command is deprecated
+       # Suppress this error; unimportant for CI tests
+       ignore:Extraction path is writable by group/others:UserWarning
+       # Suppress weird RuntimeWarning.
+       ignore:Parent module 'setuptools' not found while handling absolute import:RuntimeWarning
+       # Suppress use of bytes for filenames on Windows until fixed #2016
+       ignore:The Windows bytes API has been deprecated:DeprecationWarning
+
+       # https://github.com/pypa/setuptools/issues/2823
+       ignore:setup_requires is deprecated.
+
+       # https://github.com/pypa/setuptools/issues/917
+       ignore:setup.py install is deprecated.
+       ignore:easy_install command is deprecated.
index d7236be6fc8581ad69ed363b75d1d310f3ef8837..65c9479c131657a86745caed199884ee7208afce 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = setuptools
-version = 58.2.0
+version = 58.3.0
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
 description = Easily download, build, install, upgrade, and uninstall Python packages
index 9d6f0bc0dd674e92a985a5f997b17039ade95217..a623262e74a6ef5e885452f9783f84c9264ae036 100644 (file)
@@ -4,6 +4,7 @@ from fnmatch import fnmatchcase
 import functools
 import os
 import re
+import warnings
 
 import _distutils_hack.override  # noqa: F401
 
@@ -144,6 +145,11 @@ def _install_setup_requires(attrs):
     # Honor setup.cfg's options.
     dist.parse_config_files(ignore_option_errors=True)
     if dist.setup_requires:
+        warnings.warn(
+            "setup_requires is deprecated. Supply build "
+            "dependencies using PEP 517 pyproject.toml build-requires.",
+            SetuptoolsDeprecationWarning,
+        )
         dist.fetch_build_eggs(dist.setup_requires)
 
 
index 1008f58a15e78d3af59cf09c96ca80b9ad27e407..ee2fe99c078f59a42d328272a3ce44e4ecc49acf 100644 (file)
@@ -177,7 +177,7 @@ class UnixCCompilerTestCase(unittest.TestCase):
             elif v == 'GNULD':
                 return 'yes'
         sysconfig.get_config_var = gcv
-        self.assertEqual(self.cc.rpath_foo(), '-R/foo')
+        self.assertEqual(self.cc.rpath_foo(), '-Wl,--enable-new-dtags,-R/foo')
 
         # non-GCC non-GNULD
         sys.platform = 'bar'
@@ -187,7 +187,7 @@ class UnixCCompilerTestCase(unittest.TestCase):
             elif v == 'GNULD':
                 return 'no'
         sysconfig.get_config_var = gcv
-        self.assertEqual(self.cc.rpath_foo(), '-R/foo')
+        self.assertEqual(self.cc.rpath_foo(), '-Wl,-R/foo')
 
     @unittest.skipIf(sys.platform == 'win32', "can't test on Windows")
     def test_cc_overrides_ldshared(self):
index 349cc1642b74c398b9b53f5616d3f0a023dab03a..a07e59889044931c89f7d6699b20da0fa5e0e03e 100644 (file)
@@ -245,23 +245,16 @@ class UnixCCompiler(CCompiler):
             if self._is_gcc(compiler):
                 return ["-Wl,+s", "-L" + dir]
             return ["+s", "-L" + dir]
+
+        # For all compilers, `-Wl` is the presumed way to
+        # pass a compiler option to the linker and `-R` is
+        # the way to pass an RPATH.
+        if sysconfig.get_config_var("GNULD") == "yes":
+            # GNU ld needs an extra option to get a RUNPATH
+            # instead of just an RPATH.
+            return "-Wl,--enable-new-dtags,-R" + dir
         else:
-            if self._is_gcc(compiler):
-                # gcc on non-GNU systems does not need -Wl, but can
-                # use it anyway.  Since distutils has always passed in
-                # -Wl whenever gcc was used in the past it is probably
-                # safest to keep doing so.
-                if sysconfig.get_config_var("GNULD") == "yes":
-                    # GNU ld needs an extra option to get a RUNPATH
-                    # instead of just an RPATH.
-                    return "-Wl,--enable-new-dtags,-R" + dir
-                else:
-                    return "-Wl,-R" + dir
-            else:
-                # No idea how --enable-new-dtags would be passed on to
-                # ld if this system was using GNU ld.  Don't know if a
-                # system like this even exists.
-                return "-R" + dir
+            return "-Wl,-R" + dir
 
     def library_option(self, lib):
         return "-l" + lib
index 64f06dd4bce4d634946bb836d56eff78196e0b6d..afc23c4e233f5bd046daf34bce13c248fa41d488 100644 (file)
@@ -134,14 +134,14 @@ def get_macosx_target_ver():
     """Return the version of macOS for which we are building.
 
     The target version defaults to the version in sysconfig latched at time
-    the Python interpreter was built, unless overriden by an environment
+    the Python interpreter was built, unless overridden by an environment
     variable. If neither source has a value, then None is returned"""
 
     syscfg_ver = get_macosx_target_ver_from_syscfg()
     env_ver = os.environ.get(MACOSX_VERSION_VAR)
 
     if env_ver:
-        # Validate overriden version against sysconfig version, if have both.
+        # Validate overridden version against sysconfig version, if have both.
         # Ensure that the deployment target of the build process is not less
         # than 10.3 if the interpreter was built for 10.3 or later.  This
         # ensures extension modules are built with correct compatibility
index b88c3e9a5abf788e2cb5de4689fbf03ba90a2e0f..1aed0e87036ca7ef286d3cdebdeb86b03747e932 100644 (file)
@@ -153,6 +153,12 @@ class easy_install(Command):
     create_index = PackageIndex
 
     def initialize_options(self):
+        warnings.warn(
+            "easy_install command is deprecated. "
+            "Use build and pip and other standards-based tools.",
+            EasyInstallDeprecationWarning,
+        )
+
         # the --user option seems to be an opt-in one,
         # so the default should be False.
         self.user = 0
index 72b9a3e424707633c7e31a347170f358cfa3f87a..35e54d2043ae087db660d3158561c7f865cf1681 100644 (file)
@@ -30,6 +30,13 @@ class install(orig.install):
     _nc = dict(new_commands)
 
     def initialize_options(self):
+
+        warnings.warn(
+            "setup.py install is deprecated. "
+            "Use build and pip and other standards-based tools.",
+            setuptools.SetuptoolsDeprecationWarning,
+        )
+
         orig.install.initialize_options(self)
         self.old_and_unmanageable = None
         self.single_version_externally_managed = None
index 399dbaf0bbec0f838f7246f9caecf09c971857a0..462e20c78fcb77ec9b8affa29c78208022c6e182 100644 (file)
@@ -45,7 +45,8 @@ def test_clean_env_install(bare_virtualenv, tmp_src):
     """
     Check setuptools can be installed in a clean environment.
     """
-    bare_virtualenv.run(['python', 'setup.py', 'install'], cd=tmp_src)
+    cmd = [bare_virtualenv.python, 'setup.py', 'install']
+    bare_virtualenv.run(cmd, cd=tmp_src)
 
 
 def _get_pip_versions():
@@ -203,5 +204,5 @@ def test_no_missing_dependencies(bare_virtualenv, request):
     Quick and dirty test to ensure all external dependencies are vendored.
     """
     for command in ('upload',):  # sorted(distutils.command.__all__):
-        cmd = ['python', 'setup.py', command, '-h']
+        cmd = [bare_virtualenv.python, 'setup.py', command, '-h']
         bare_virtualenv.run(cmd, cd=request.config.rootdir)