From: JinWang An Date: Mon, 27 Mar 2023 08:02:33 +0000 (+0900) Subject: Imported Upstream version 55.0.0 X-Git-Tag: upstream/55.0.0^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8734845a72fdcb22defa19646238f67b95c6b2fc;p=platform%2Fupstream%2Fpython-setuptools.git Imported Upstream version 55.0.0 --- diff --git a/.bumpversion.cfg b/.bumpversion.cfg index fdde718..7fe611a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 54.2.0 +current_version = 55.0.0 commit = True tag = True diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f544814..37d65f3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,4 +40,3 @@ jobs: env: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TIDELIFT_TOKEN: ${{ secrets.TIDELIFT_TOKEN }} diff --git a/.readthedocs.yml b/.readthedocs.yml index 850d79c..cc69854 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,4 +1,6 @@ version: 2 python: install: - - requirements: docs/requirements.txt + - path: . + extra_requirements: + - docs diff --git a/CHANGES.rst b/CHANGES.rst index dca490b..d073fa8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v55.0.0 +------- + + +Breaking Changes +^^^^^^^^^^^^^^^^ +* #2566: Remove the deprecated ``bdist_wininst`` command. Binary packages should be built as wheels instead. -- by :user:`hroncok` + + v54.2.0 ------- diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index c31edfe..47ce249 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -8,6 +8,11 @@ import warnings is_pypy = '__pypy__' in sys.builtin_module_names +warnings.filterwarnings('ignore', + '.+ distutils .+ deprecated', + DeprecationWarning) + + def warn_distutils_present(): if 'distutils' not in sys.modules: return diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 0292759..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -# keep these in sync with setup.cfg -sphinx -jaraco.packaging>=6.1 -rst.linker>=1.9 -pygments-github-lexers==0.0.5 -sphinx-inline-tabs - -setuptools>=34 diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 842ade8..0a8070a 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -156,7 +156,7 @@ to use ``find_namespace:``: =src packages = find_namespace: - [options.packages.find_namespace] + [options.packages.find] where = src When you install the zipped distribution, ``timmins.foo`` would become diff --git a/setup.cfg b/setup.cfg index 1b0e618..6bb6508 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 54.2.0 +version = 55.0.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages @@ -67,15 +67,14 @@ testing = jaraco.path>=3.2.0 docs = - # Keep these in sync with docs/requirements.txt # upstream sphinx jaraco.packaging >= 8.2 rst.linker >= 1.9 - sphinx-inline-tabs # local pygments-github-lexers==0.0.5 + sphinx-inline-tabs ssl = wincertstore==0.2; sys_platform=='win32' diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 743f558..570e695 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -2,7 +2,7 @@ __all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', - 'bdist_wininst', 'upload_docs', 'build_clib', 'dist_info', + 'upload_docs', 'build_clib', 'dist_info', ] from distutils.command.bdist import bdist diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py deleted file mode 100644 index ff4b634..0000000 --- a/setuptools/command/bdist_wininst.py +++ /dev/null @@ -1,30 +0,0 @@ -import distutils.command.bdist_wininst as orig -import warnings - -from setuptools import SetuptoolsDeprecationWarning - - -class bdist_wininst(orig.bdist_wininst): - def reinitialize_command(self, command, reinit_subcommands=0): - """ - Supplement reinitialize_command to work around - http://bugs.python.org/issue20819 - """ - cmd = self.distribution.reinitialize_command( - command, reinit_subcommands) - if command in ('install', 'install_lib'): - cmd.install_lib = None - return cmd - - def run(self): - warnings.warn( - "bdist_wininst is deprecated and will be removed in a future " - "version. Use bdist_wheel (wheel packages) instead.", - SetuptoolsDeprecationWarning - ) - - self._is_running = True - try: - orig.bdist_wininst.run(self) - finally: - self._is_running = False diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 0917804..45adb6a 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -2193,7 +2193,7 @@ class WindowsScriptWriter(ScriptWriter): @classmethod def _adjust_header(cls, type_, orig_header): """ - Make sure 'pythonw' is used for gui and and 'python' is used for + Make sure 'pythonw' is used for gui and 'python' is used for console (regardless of what sys.executable is). """ pattern = 'pythonw.exe' diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py index 8c9a15e..9cd8eb0 100644 --- a/setuptools/command/install_scripts.py +++ b/setuptools/command/install_scripts.py @@ -1,5 +1,6 @@ from distutils import log import distutils.command.install_scripts as orig +from distutils.errors import DistutilsModuleError import os import sys @@ -35,7 +36,7 @@ class install_scripts(orig.install_scripts): try: bw_cmd = self.get_finalized_command("bdist_wininst") is_wininst = getattr(bw_cmd, '_is_running', False) - except ImportError: + except (ImportError, DistutilsModuleError): is_wininst = False writer = ei.ScriptWriter if is_wininst: diff --git a/setuptools/tests/test_bdist_deprecations.py b/setuptools/tests/test_bdist_deprecations.py deleted file mode 100644 index 704164a..0000000 --- a/setuptools/tests/test_bdist_deprecations.py +++ /dev/null @@ -1,23 +0,0 @@ -"""develop tests -""" -import mock - -import pytest - -from setuptools.dist import Distribution -from setuptools import SetuptoolsDeprecationWarning - - -@mock.patch("distutils.command.bdist_wininst.bdist_wininst") -def test_bdist_wininst_warning(distutils_cmd): - dist = Distribution(dict( - script_name='setup.py', - script_args=['bdist_wininst'], - name='foo', - py_modules=['hi'], - )) - dist.parse_command_line() - with pytest.warns(SetuptoolsDeprecationWarning): - dist.run_commands() - - distutils_cmd.run.assert_called_once() diff --git a/tox.ini b/tox.ini index aea213c..04e77ed 100644 --- a/tox.ini +++ b/tox.ini @@ -56,11 +56,9 @@ deps = twine>=3 path jaraco.develop>=7.1 - jaraco.tidelift passenv = TWINE_PASSWORD GITHUB_TOKEN - TIDELIFT_TOKEN setenv = TWINE_USERNAME = {env:TWINE_USERNAME:__token__} commands = @@ -71,4 +69,3 @@ commands = python -m build python -m twine upload dist/* python -m jaraco.develop.create-github-release - python -m jaraco.tidelift.publish-release-notes