From dad04a44aecc40ef33c9f2f319762afa4ce3a405 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 27 Mar 2023 17:02:37 +0900 Subject: [PATCH] Imported Upstream version 58.4.0 --- .bumpversion.cfg | 2 +- .editorconfig | 1 + .github/workflows/main.yml | 9 ++++++--- CHANGES.rst | 19 ++++++++++++++++++- docs/conf.py | 11 +++++++++-- docs/development/developer-guide.rst | 13 +++++++++++-- docs/userguide/declarative_config.rst | 12 ++++-------- pkg_resources/__init__.py | 5 +++++ pyproject.toml | 4 +--- pytest.ini | 5 +++-- setup.cfg | 4 ++-- setuptools/tests/test_virtualenv.py | 8 -------- 12 files changed, 61 insertions(+), 32 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5779356..095e606 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.3.0 +current_version = 58.4.0 commit = True tag = True diff --git a/.editorconfig b/.editorconfig index 6385b57..b8aeea1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,7 @@ end_of_line = lf [*.py] indent_style = space +max_line_length = 88 [*.{yml,yaml}] indent_style = space diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b348056..a82b6fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,8 +10,11 @@ jobs: - pypy3 - 3.6 - 3.9 - - 3.10.0-alpha - 3.10.99 - platform: [ubuntu-latest, macos-latest, windows-latest] + - "3.10" + platform: + - ubuntu-latest + - macos-latest + - windows-latest runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v2 @@ -42,7 +45,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: "3.10" - name: Install tox run: | python -m pip install tox diff --git a/CHANGES.rst b/CHANGES.rst index c8ecd1e..89e525c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,20 @@ +v58.4.0 +------- + + +Changes +^^^^^^^ +* #2497: Officially deprecated PEP 440 non-compliant versions. + +Documentation changes +^^^^^^^^^^^^^^^^^^^^^ +* #2932: Removed the deprecated ``data_files`` option from the example in the + declarative configuration docs -- by :user:`abravalheri` +* #2932: Change type of ``data_files`` option from ``dict`` to ``section`` in + declarative configuration docs (to match previous example) -- by + :user:`abravalheri` + + v58.3.0 ------- @@ -7,7 +24,7 @@ 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. +* #2785: Replace ``configparser``'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. diff --git a/docs/conf.py b/docs/conf.py index 8f1e1f4..ba54142 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -76,17 +76,24 @@ link_files = { # Be strict about any broken references: nitpicky = True +# Include Python intersphinx mapping to prevent failures +# jaraco/skeleton#51 +extensions += ['sphinx.ext.intersphinx'] intersphinx_mapping = { - 'pypa-build': ('https://pypa-build.readthedocs.io/en/latest/', None) + 'python': ('https://docs.python.org/3', None), } +intersphinx_mapping.update({ + 'pypa-build': ('https://pypa-build.readthedocs.io/en/latest/', None) +}) + # Add support for linking usernames github_url = 'https://github.com' github_sponsors_url = f'{github_url}/sponsors' extlinks = { 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 } -extensions += ['sphinx.ext.extlinks', 'sphinx.ext.intersphinx'] +extensions += ['sphinx.ext.extlinks'] # Ref: https://github.com/python-attrs/attrs/pull/571/files\ # #diff-85987f48f1258d9ee486e3191495582dR82 diff --git a/docs/development/developer-guide.rst b/docs/development/developer-guide.rst index d6ed2c1..052ca76 100644 --- a/docs/development/developer-guide.rst +++ b/docs/development/developer-guide.rst @@ -123,5 +123,14 @@ setuptools from source. Eventually, this limitation may be lifted as PEP 517/518 reach ubiquitous adoption, but for now, Setuptools cannot declare dependencies other than through ``setuptools/_vendor/vendored.txt`` and -``pkg_resources/_vendor/vendored.txt`` and refreshed by way of -``paver update_vendored`` (pavement.py). +``pkg_resources/_vendor/vendored.txt``. + +All the dependencies specified in these files are "vendorized" using Paver_, a +simple Python-based project scripting and task running tool. + +To refresh the dependencies, you can run the following command (defined in +``pavement.py``):: + + $ paver update_vendored + +.. _Paver: https://pythonhosted.org/Paver/ diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst index abafe37..d1c25df 100644 --- a/docs/userguide/declarative_config.rst +++ b/docs/userguide/declarative_config.rst @@ -63,13 +63,6 @@ boilerplate code in some cases. src.subpackage1 src.subpackage2 - [options.data_files] - /etc/my_package = - site.d/00_default.conf - host.d/00_default.conf - data = data/img/logo.png, data/svg/icon.svg - fonts = data/fonts/*.ttf, data/fonts/*.otf - Metadata and options are set in the config sections of the same name. * Keys are the same as the keyword arguments one provides to the ``setup()`` @@ -222,7 +215,7 @@ package_data section [# exclude_package_data section namespace_packages list-comma py_modules list-comma 34.4.0 -data_files dict 40.6.0 +data_files section 40.6.0 [#opt-4]_ ======================= =================================== =============== ========= **Notes**: @@ -250,6 +243,9 @@ data_files dict 40.6.0 The ``find_namespace:`` directive is supported since Python >=3.3. +.. [#opt-4] ``data_files`` is deprecated and should be avoided. + Please check :doc:`/userguide/datafiles` for more information. + Compatibility with other tools ============================== diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index c84f1dd..3aafe65 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -113,6 +113,11 @@ def parse_version(v): try: return packaging.version.Version(v) except packaging.version.InvalidVersion: + warnings.warn( + f"{v} is an invalid version and will not be supported in " + "a future release", + PkgResourcesDeprecationWarning, + ) return packaging.version.LegacyVersion(v) diff --git a/pyproject.toml b/pyproject.toml index 70e3473..03c4012 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,5 @@ [build-system] -requires = [ - "wheel", -] +requires = [] build-backend = "setuptools.build_meta" backend-path = ["."] diff --git a/pytest.ini b/pytest.ini index c7b62cc..2678afd 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,8 +5,6 @@ addopts= --doctest-glob=pkg_resources/api_tests.txt -r sxX doctest_optionflags=ALLOW_UNICODE ELLIPSIS -# workaround for warning pytest-dev/pytest#6178 -junit_family=xunit2 filterwarnings= # Fail on warnings error @@ -33,3 +31,6 @@ filterwarnings= # https://github.com/pypa/setuptools/issues/917 ignore:setup.py install is deprecated. ignore:easy_install command is deprecated. + + # https://github.com/pypa/setuptools/issues/2497 + ignore:.* is an invalid version and will not be supported::pkg_resources diff --git a/setup.cfg b/setup.cfg index 65c9479..50622cc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.3.0 +version = 58.4.0 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages @@ -39,7 +39,7 @@ exclude = [options.extras_require] testing = # upstream - pytest >= 4.6 + pytest >= 6 pytest-checkdocs >= 2.4 pytest-flake8 pytest-black >= 0.3.7; \ diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 462e20c..2abedfc 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -75,15 +75,7 @@ def _get_pip_versions(): def skip_network(param): return param if network else mark(param, pytest.mark.skip(reason="no network")) - issue2599 = pytest.mark.skipif( - sys.version_info > (3, 10), - reason="pypa/setuptools#2599", - ) - network_versions = [ - mark('pip==9.0.3', issue2599), - mark('pip==10.0.1', issue2599), - mark('pip==18.1', issue2599), mark('pip==19.3.1', pytest.mark.xfail(reason='pypa/pip#6599')), 'pip==20.0.2', 'https://github.com/pypa/pip/archive/main.zip', -- 2.34.1