Imported Upstream version 60.9.1 upstream/60.9.1
authorJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:46 +0000 (17:02 +0900)
committerJinWang An <jinwang.an@samsung.com>
Mon, 27 Mar 2023 08:02:46 +0000 (17:02 +0900)
24 files changed:
.bumpversion.cfg
.github/workflows/main.yml
CHANGES.rst
setup.cfg
setuptools/_entry_points.py
setuptools/_importlib.py
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/INSTALLER [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/LICENSE [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/METADATA [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/RECORD [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/REQUESTED [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/WHEEL [deleted file]
setuptools/_vendor/importlib_metadata-4.10.1.dist-info/top_level.txt [deleted file]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/INSTALLER [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/LICENSE [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/METADATA [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/RECORD [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/REQUESTED [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/WHEEL [new file with mode: 0644]
setuptools/_vendor/importlib_metadata-4.11.1.dist-info/top_level.txt [new file with mode: 0644]
setuptools/_vendor/importlib_metadata/__init__.py
setuptools/_vendor/vendored.txt
setuptools/tests/test_build_meta.py
tox.ini

index 93624e4c90e4ce188ceb44bc9947df799b66403e..7f5864f86a52cb7e5590049748d0b3688483e862 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 60.9.0
+current_version = 60.9.1
 commit = True
 tag = True
 
index 623737343e0d5f269dddd9dbdae355547da88723..c985f851e7e80bdd235552be000c992e9a86b966 100644 (file)
@@ -11,7 +11,6 @@ jobs:
     strategy:
       matrix:
         distutils:
-        - stdlib
         - local
         python:
         - pypy-3.7
@@ -23,6 +22,10 @@ jobs:
         - 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 }}
@@ -46,14 +49,7 @@ jobs:
             ${{ 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
@@ -76,11 +72,6 @@ jobs:
           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:
@@ -91,8 +82,6 @@ jobs:
     #    "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
index dc1fac3433ffd711860f9af4116a0e1d4144c155..efe34d3c7f915bf4166342e5eb02d4bf88198e6d 100644 (file)
@@ -1,3 +1,14 @@
+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
 -------
 
index 59999cc70b0265afea1786ed8fcd1f14003123a2..555038c4902628c8117477cb083eb27a9a0da792 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [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
index 0cf2691b3af3c9b79eff40a6a4220e49e711fa25..f087681b5980b586c79fb4d87f99e33597eb1575 100644 (file)
@@ -53,7 +53,16 @@ def load(eps):
 
 @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)
index c529ccd3322fe9bfd3aa8f0870ecff478c6d976b..c1ac137e1155cfa08632349bd7e5ebc0779df6bf 100644 (file)
@@ -1,8 +1,31 @@
 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
 
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/INSTALLER b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/INSTALLER
deleted file mode 100644 (file)
index a1b589e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-pip
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/LICENSE b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/LICENSE
deleted file mode 100644 (file)
index be7e092..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-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.
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/METADATA b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/METADATA
deleted file mode 100644 (file)
index 7327b88..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-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/
-
-
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/RECORD b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/RECORD
deleted file mode 100644 (file)
index ebedf90..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-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
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/REQUESTED b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/REQUESTED
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/WHEEL b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/WHEEL
deleted file mode 100644 (file)
index becc9a6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Wheel-Version: 1.0
-Generator: bdist_wheel (0.37.1)
-Root-Is-Purelib: true
-Tag: py3-none-any
-
diff --git a/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/top_level.txt b/setuptools/_vendor/importlib_metadata-4.10.1.dist-info/top_level.txt
deleted file mode 100644 (file)
index bbb0754..0000000
+++ /dev/null
@@ -1 +0,0 @@
-importlib_metadata
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/INSTALLER b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/INSTALLER
new file mode 100644 (file)
index 0000000..a1b589e
--- /dev/null
@@ -0,0 +1 @@
+pip
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/LICENSE b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/LICENSE
new file mode 100644 (file)
index 0000000..be7e092
--- /dev/null
@@ -0,0 +1,13 @@
+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.
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/METADATA b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/METADATA
new file mode 100644 (file)
index 0000000..fda4bc7
--- /dev/null
@@ -0,0 +1,118 @@
+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/
+
+
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/RECORD b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/RECORD
new file mode 100644 (file)
index 0000000..d8c2dff
--- /dev/null
@@ -0,0 +1,24 @@
+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
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/REQUESTED b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/REQUESTED
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/WHEEL b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/WHEEL
new file mode 100644 (file)
index 0000000..becc9a6
--- /dev/null
@@ -0,0 +1,5 @@
+Wheel-Version: 1.0
+Generator: bdist_wheel (0.37.1)
+Root-Is-Purelib: true
+Tag: py3-none-any
+
diff --git a/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/top_level.txt b/setuptools/_vendor/importlib_metadata-4.11.1.dist-info/top_level.txt
new file mode 100644 (file)
index 0000000..bbb0754
--- /dev/null
@@ -0,0 +1 @@
+importlib_metadata
index 45541179aa97f0994e1fd64ac8f3ca470ceab9ad..292e0c6d4a73d5e2b8003394fe316dc3317d9e92 100644 (file)
@@ -283,6 +283,8 @@ class DeprecatedList(list):
     1
     """
 
+    __slots__ = ()
+
     _warn = functools.partial(
         warnings.warn,
         "EntryPoints list interface is deprecated. Cast to list if needed.",
@@ -295,21 +297,15 @@ class DeprecatedList(list):
             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):
@@ -663,7 +659,7 @@ class Distribution:
 
     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):
index 1dd32ef27e0cd45403c39ed0adf4bc9f7bb8f5be..db24b402f5154fdf83f82cc632230b62385429b1 100644 (file)
@@ -4,7 +4,7 @@ ordered-set==3.1.1
 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
index 0f4a1a7363829bc1723426b34493a3336ac79d45..9270aa7cf87fdc4fdf5e0a6d490c1bfbdd643316 100644 (file)
@@ -1,7 +1,9 @@
 import os
 import shutil
+import signal
 import tarfile
 import importlib
+import contextlib
 from concurrent import futures
 import re
 
@@ -11,6 +13,9 @@ from jaraco import path
 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
@@ -31,10 +36,23 @@ class BuildBackend(BuildBackendBase):
         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):
diff --git a/tox.ini b/tox.ini
index 4152c1b31d5663c21fc7e984a64c11452bc5b7ee..6b587e28959cedbaa296a6d3416e42ce4fcd20ca 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -14,6 +14,7 @@ usedevelop = True
 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