[bumpversion]
-current_version = 60.9.0
+current_version = 60.9.1
commit = True
tag = True
strategy:
matrix:
distutils:
- - stdlib
- local
python:
- pypy-3.7
- ubuntu-latest
- macos-latest
- windows-latest
+ include:
+ - platform: ubuntu-latest
+ python: "3.10"
+ distutils: stdlib
runs-on: ${{ matrix.platform }}
env:
SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
${{ matrix.python }}
test_cygwin:
- strategy:
- matrix:
- distutils:
- - stdlib
- - local
runs-on: windows-latest
- env:
- SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
steps:
- uses: actions/checkout@v2
- name: Install Cygwin with Python
tox -- --cov-report xml
integration-test:
- strategy:
- matrix:
- distutils:
- - stdlib
- - local
needs: test
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
# To avoid long times and high resource usage, we assume that:
# "integration")
# With that in mind, the integration tests can run for a single setup
runs-on: ubuntu-latest
- env:
- SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }}
steps:
- uses: actions/checkout@v2
- name: Install OS-level dependencies
+v60.9.1
+-------
+
+
+Misc
+^^^^
+* #3102: Prevent vendored importlib_metadata from loading distributions from older importlib_metadata.
+* #3103: Fixed issue where string-based entry points would be omitted.
+* #3107: Bump importlib_metadata to 4.11.1 addressing issue with parsing requirements in egg-info as found in PyPy.
+
+
v60.9.0
-------
[metadata]
name = setuptools
-version = 60.9.0
+version = 60.9.1
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
@load.register(str)
def _(eps):
- return validate(metadata.EntryPoints._from_text(eps))
+ r"""
+ >>> ep, = load('[console_scripts]\nfoo=bar')
+ >>> ep.group
+ 'console_scripts'
+ >>> ep.name
+ 'foo'
+ >>> ep.value
+ 'bar'
+ """
+ return validate(metadata.EntryPoints(metadata.EntryPoints._from_text(eps)))
load.register(type(None), lambda x: x)
import sys
+def disable_importlib_metadata_finder(metadata):
+ """
+ Ensure importlib_metadata doesn't provide older, incompatible
+ Distributions.
+
+ Workaround for #3102.
+ """
+ try:
+ import importlib_metadata
+ except ImportError:
+ return
+ if importlib_metadata is metadata:
+ return
+ to_remove = [
+ ob
+ for ob in sys.meta_path
+ if isinstance(ob, importlib_metadata.MetadataPathFinder)
+ ]
+ for item in to_remove:
+ sys.meta_path.remove(item)
+
+
if sys.version_info < (3, 10):
from setuptools.extern import importlib_metadata as metadata
+ disable_importlib_metadata_finder(metadata)
else:
import importlib.metadata as metadata # noqa: F401
+++ /dev/null
-Copyright 2017-2019 Jason R. Coombs, Barry Warsaw
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+++ /dev/null
-Metadata-Version: 2.1
-Name: importlib-metadata
-Version: 4.10.1
-Summary: Read metadata from Python packages
-Home-page: https://github.com/python/importlib_metadata
-Author: Jason R. Coombs
-Author-email: jaraco@jaraco.com
-License: UNKNOWN
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: Apache Software License
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3 :: Only
-Requires-Python: >=3.7
-License-File: LICENSE
-Requires-Dist: zipp (>=0.5)
-Requires-Dist: typing-extensions (>=3.6.4) ; python_version < "3.8"
-Provides-Extra: docs
-Requires-Dist: sphinx ; extra == 'docs'
-Requires-Dist: jaraco.packaging (>=8.2) ; extra == 'docs'
-Requires-Dist: rst.linker (>=1.9) ; extra == 'docs'
-Provides-Extra: perf
-Requires-Dist: ipython ; extra == 'perf'
-Provides-Extra: testing
-Requires-Dist: pytest (>=6) ; extra == 'testing'
-Requires-Dist: pytest-checkdocs (>=2.4) ; extra == 'testing'
-Requires-Dist: pytest-flake8 ; extra == 'testing'
-Requires-Dist: pytest-cov ; extra == 'testing'
-Requires-Dist: pytest-enabler (>=1.0.1) ; extra == 'testing'
-Requires-Dist: packaging ; extra == 'testing'
-Requires-Dist: pyfakefs ; extra == 'testing'
-Requires-Dist: flufl.flake8 ; extra == 'testing'
-Requires-Dist: pytest-perf (>=0.9.2) ; extra == 'testing'
-Requires-Dist: pytest-black (>=0.3.7) ; (platform_python_implementation != "PyPy") and extra == 'testing'
-Requires-Dist: pytest-mypy ; (platform_python_implementation != "PyPy") and extra == 'testing'
-Requires-Dist: importlib-resources (>=1.3) ; (python_version < "3.9") and extra == 'testing'
-
-.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
- :target: `PyPI link`_
-
-.. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg
- :target: `PyPI link`_
-
-.. _PyPI link: https://pypi.org/project/importlib_metadata
-
-.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg
- :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22
- :alt: tests
-
-.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
- :target: https://github.com/psf/black
- :alt: Code style: Black
-
-.. image:: https://readthedocs.org/projects/importlib-metadata/badge/?version=latest
- :target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
-
-.. image:: https://img.shields.io/badge/skeleton-2021-informational
- :target: https://blog.jaraco.com/skeleton
-
-
-Library to access the metadata for a Python package.
-
-This package supplies third-party access to the functionality of
-`importlib.metadata <https://docs.python.org/3/library/importlib.metadata.html>`_
-including improvements added to subsequent Python versions.
-
-
-Compatibility
-=============
-
-New features are introduced in this third-party library and later merged
-into CPython. The following table indicates which versions of this library
-were contributed to different versions in the standard library:
-
-.. list-table::
- :header-rows: 1
-
- * - importlib_metadata
- - stdlib
- * - 4.8
- - 3.11
- * - 4.4
- - 3.10
- * - 1.4
- - 3.8
-
-
-Usage
-=====
-
-See the `online documentation <https://importlib_metadata.readthedocs.io/>`_
-for usage details.
-
-`Finder authors
-<https://docs.python.org/3/reference/import.html#finders-and-loaders>`_ can
-also add support for custom package installers. See the above documentation
-for details.
-
-
-Caveats
-=======
-
-This project primarily supports third-party packages installed by PyPA
-tools (or other conforming packages). It does not support:
-
-- Packages in the stdlib.
-- Packages installed without metadata.
-
-Project details
-===============
-
- * Project home: https://github.com/python/importlib_metadata
- * Report bugs at: https://github.com/python/importlib_metadata/issues
- * Code hosting: https://github.com/python/importlib_metadata
- * Documentation: https://importlib_metadata.readthedocs.io/
-
-
+++ /dev/null
-importlib_metadata-4.10.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4\r
-importlib_metadata-4.10.1.dist-info/LICENSE,sha256=wNe6dAchmJ1VvVB8D9oTc-gHHadCuaSBAev36sYEM6U,571\r
-importlib_metadata-4.10.1.dist-info/METADATA,sha256=-HDYj3iK6bcjwN5MAoO58Op6WQIYQfbhl6ZaPqL0IZI,3989\r
-importlib_metadata-4.10.1.dist-info/RECORD,,\r
-importlib_metadata-4.10.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0\r
-importlib_metadata-4.10.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92\r
-importlib_metadata-4.10.1.dist-info/top_level.txt,sha256=CO3fD9yylANiXkrMo4qHLV_mqXL2sC5JFKgt1yWAT-A,19\r
-importlib_metadata/__init__.py,sha256=7WxDdbPPu4Wy3VeMTApd-JlPQoENgVDyDH6aqyE7acE,30175\r
-importlib_metadata/__pycache__/__init__.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_adapters.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_collections.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_compat.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_functools.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_itertools.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_meta.cpython-310.pyc,,\r
-importlib_metadata/__pycache__/_text.cpython-310.pyc,,\r
-importlib_metadata/_adapters.py,sha256=B6fCi5-8mLVDFUZj3krI5nAo-mKp1dH_qIavyIyFrJs,1862\r
-importlib_metadata/_collections.py,sha256=CJ0OTCHIjWA0ZIVS4voORAsn2R4R2cQBEtPsZEJpASY,743\r
-importlib_metadata/_compat.py,sha256=EU2XCFBPFByuI0Of6XkAuBYbzqSyjwwwwqmsK4ccna0,1826\r
-importlib_metadata/_functools.py,sha256=PsY2-4rrKX4RVeRC1oGp1lB1pmC9eKN88_f-bD9uOoA,2895\r
-importlib_metadata/_itertools.py,sha256=cvr_2v8BRbxcIl5x5ldfqdHjhI8Yi8s8yk50G_nm6jQ,2068\r
-importlib_metadata/_meta.py,sha256=_F48Hu_jFxkfKWz5wcYS8vO23qEygbVdF9r-6qh-hjE,1154\r
-importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166\r
-importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0\r
+++ /dev/null
-Wheel-Version: 1.0
-Generator: bdist_wheel (0.37.1)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
+++ /dev/null
-importlib_metadata
--- /dev/null
+Copyright 2017-2019 Jason R. Coombs, Barry Warsaw
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
--- /dev/null
+Metadata-Version: 2.1
+Name: importlib-metadata
+Version: 4.11.1
+Summary: Read metadata from Python packages
+Home-page: https://github.com/python/importlib_metadata
+Author: Jason R. Coombs
+Author-email: jaraco@jaraco.com
+License: UNKNOWN
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3 :: Only
+Requires-Python: >=3.7
+License-File: LICENSE
+Requires-Dist: zipp (>=0.5)
+Requires-Dist: typing-extensions (>=3.6.4) ; python_version < "3.8"
+Provides-Extra: docs
+Requires-Dist: sphinx ; extra == 'docs'
+Requires-Dist: jaraco.packaging (>=8.2) ; extra == 'docs'
+Requires-Dist: rst.linker (>=1.9) ; extra == 'docs'
+Provides-Extra: perf
+Requires-Dist: ipython ; extra == 'perf'
+Provides-Extra: testing
+Requires-Dist: pytest (>=6) ; extra == 'testing'
+Requires-Dist: pytest-checkdocs (>=2.4) ; extra == 'testing'
+Requires-Dist: pytest-flake8 ; extra == 'testing'
+Requires-Dist: pytest-cov ; extra == 'testing'
+Requires-Dist: pytest-enabler (>=1.0.1) ; extra == 'testing'
+Requires-Dist: packaging ; extra == 'testing'
+Requires-Dist: pyfakefs ; extra == 'testing'
+Requires-Dist: flufl.flake8 ; extra == 'testing'
+Requires-Dist: pytest-perf (>=0.9.2) ; extra == 'testing'
+Requires-Dist: pytest-black (>=0.3.7) ; (platform_python_implementation != "PyPy") and extra == 'testing'
+Requires-Dist: pytest-mypy (>=0.9.1) ; (platform_python_implementation != "PyPy") and extra == 'testing'
+Requires-Dist: importlib-resources (>=1.3) ; (python_version < "3.9") and extra == 'testing'
+
+.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
+ :target: `PyPI link`_
+
+.. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg
+ :target: `PyPI link`_
+
+.. _PyPI link: https://pypi.org/project/importlib_metadata
+
+.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg
+ :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22
+ :alt: tests
+
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+ :alt: Code style: Black
+
+.. image:: https://readthedocs.org/projects/importlib-metadata/badge/?version=latest
+ :target: https://importlib-metadata.readthedocs.io/en/latest/?badge=latest
+
+.. image:: https://img.shields.io/badge/skeleton-2022-informational
+ :target: https://blog.jaraco.com/skeleton
+
+
+Library to access the metadata for a Python package.
+
+This package supplies third-party access to the functionality of
+`importlib.metadata <https://docs.python.org/3/library/importlib.metadata.html>`_
+including improvements added to subsequent Python versions.
+
+
+Compatibility
+=============
+
+New features are introduced in this third-party library and later merged
+into CPython. The following table indicates which versions of this library
+were contributed to different versions in the standard library:
+
+.. list-table::
+ :header-rows: 1
+
+ * - importlib_metadata
+ - stdlib
+ * - 4.8
+ - 3.11
+ * - 4.4
+ - 3.10
+ * - 1.4
+ - 3.8
+
+
+Usage
+=====
+
+See the `online documentation <https://importlib_metadata.readthedocs.io/>`_
+for usage details.
+
+`Finder authors
+<https://docs.python.org/3/reference/import.html#finders-and-loaders>`_ can
+also add support for custom package installers. See the above documentation
+for details.
+
+
+Caveats
+=======
+
+This project primarily supports third-party packages installed by PyPA
+tools (or other conforming packages). It does not support:
+
+- Packages in the stdlib.
+- Packages installed without metadata.
+
+Project details
+===============
+
+ * Project home: https://github.com/python/importlib_metadata
+ * Report bugs at: https://github.com/python/importlib_metadata/issues
+ * Code hosting: https://github.com/python/importlib_metadata
+ * Documentation: https://importlib_metadata.readthedocs.io/
+
+
--- /dev/null
+importlib_metadata-4.11.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4\r
+importlib_metadata-4.11.1.dist-info/LICENSE,sha256=wNe6dAchmJ1VvVB8D9oTc-gHHadCuaSBAev36sYEM6U,571\r
+importlib_metadata-4.11.1.dist-info/METADATA,sha256=XNgM09x6V8tbt6ugvKjiUxH9yB7pBdILWuWE5YNWHRw,3999\r
+importlib_metadata-4.11.1.dist-info/RECORD,,\r
+importlib_metadata-4.11.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0\r
+importlib_metadata-4.11.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92\r
+importlib_metadata-4.11.1.dist-info/top_level.txt,sha256=CO3fD9yylANiXkrMo4qHLV_mqXL2sC5JFKgt1yWAT-A,19\r
+importlib_metadata/__init__.py,sha256=Wkh_tb0u0Ds_615ByV9VLLjqgoOWirwMY8EW40oO3nM,30122\r
+importlib_metadata/__pycache__/__init__.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_adapters.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_collections.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_compat.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_functools.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_itertools.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_meta.cpython-310.pyc,,\r
+importlib_metadata/__pycache__/_text.cpython-310.pyc,,\r
+importlib_metadata/_adapters.py,sha256=B6fCi5-8mLVDFUZj3krI5nAo-mKp1dH_qIavyIyFrJs,1862\r
+importlib_metadata/_collections.py,sha256=CJ0OTCHIjWA0ZIVS4voORAsn2R4R2cQBEtPsZEJpASY,743\r
+importlib_metadata/_compat.py,sha256=EU2XCFBPFByuI0Of6XkAuBYbzqSyjwwwwqmsK4ccna0,1826\r
+importlib_metadata/_functools.py,sha256=PsY2-4rrKX4RVeRC1oGp1lB1pmC9eKN88_f-bD9uOoA,2895\r
+importlib_metadata/_itertools.py,sha256=cvr_2v8BRbxcIl5x5ldfqdHjhI8Yi8s8yk50G_nm6jQ,2068\r
+importlib_metadata/_meta.py,sha256=_F48Hu_jFxkfKWz5wcYS8vO23qEygbVdF9r-6qh-hjE,1154\r
+importlib_metadata/_text.py,sha256=HCsFksZpJLeTP3NEk_ngrAeXVRRtTrtyh9eOABoRP4A,2166\r
+importlib_metadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0\r
--- /dev/null
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.37.1)
+Root-Is-Purelib: true
+Tag: py3-none-any
+
--- /dev/null
+importlib_metadata
1
"""
+ __slots__ = ()
+
_warn = functools.partial(
warnings.warn,
"EntryPoints list interface is deprecated. Cast to list if needed.",
self._warn()
return getattr(super(), method_name)(*args, **kwargs)
- return wrapped
-
- for method_name in [
- '__setitem__',
- '__delitem__',
- 'append',
- 'reverse',
- 'extend',
- 'pop',
- 'remove',
- '__iadd__',
- 'insert',
- 'sort',
- ]:
- locals()[method_name] = _wrap_deprecated_method(method_name)
+ return method_name, wrapped
+
+ locals().update(
+ map(
+ _wrap_deprecated_method,
+ '__setitem__ __delitem__ append reverse extend pop remove '
+ '__iadd__ insert sort'.split(),
+ )
+ )
def __add__(self, other):
if not isinstance(other, tuple):
def _read_egg_info_reqs(self):
source = self.read_text('requires.txt')
- return source and self._deps_from_requires_text(source)
+ return pass_none(self._deps_from_requires_text)(source)
@classmethod
def _deps_from_requires_text(cls, source):
more_itertools==8.8.0
jaraco.text==3.7.0
importlib_resources==5.4.0
-importlib_metadata==4.10.1
+importlib_metadata==4.11.1
# required for importlib_metadata on older Pythons
typing_extensions==4.0.1
# required for importlib_resources and _metadata on older Pythons
import os
import shutil
+import signal
import tarfile
import importlib
+import contextlib
from concurrent import futures
import re
from .textwrap import DALS
+TIMEOUT = int(os.getenv("TIMEOUT_BACKEND_TEST", "180")) # in seconds
+
+
class BuildBackendBase:
def __init__(self, cwd='.', env={}, backend_name='setuptools.build_meta'):
self.cwd = cwd
def method(*args, **kw):
root = os.path.abspath(self.cwd)
caller = BuildBackendCaller(root, self.env, self.backend_name)
- return self.pool.submit(caller, name, *args, **kw).result()
+ pid = None
+ try:
+ pid = self.pool.submit(os.getpid).result(TIMEOUT)
+ return self.pool.submit(caller, name, *args, **kw).result(TIMEOUT)
+ except futures.TimeoutError:
+ self.pool.shutdown(wait=False) # doesn't stop already running processes
+ self._kill(pid)
+ pytest.xfail(f"Backend did not respond before timeout ({TIMEOUT} s)")
return method
+ def _kill(self, pid):
+ if pid is None:
+ return
+ with contextlib.suppress(ProcessLookupError, OSError):
+ os.kill(pid, signal.SIGTERM if os.name == "nt" else signal.SIGKILL)
+
class BuildBackendCaller(BuildBackendBase):
def __init__(self, *args, **kwargs):
extras = testing
passenv =
SETUPTOOLS_USE_DISTUTILS
+ TIMEOUT_BACKEND_TEST # timeout (in seconds) for test_build_meta
windir # required for test_pkg_resources
# honor git config in pytest-perf
HOME