aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/importlib-metadata
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-07-08 15:54:05 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-07-08 15:54:05 +0000
commitfc7be18c76af2e700641f3598c4856baeef1428e (patch)
tree11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /contrib/python/importlib-metadata
parentec0e7ed6da6fb317741fd8468602949a1362eca5 (diff)
parentc92cb9d3a19331916f0c274d80e67f02a62caa9b (diff)
downloadydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'contrib/python/importlib-metadata')
-rw-r--r--contrib/python/importlib-metadata/py3/.dist-info/METADATA48
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py12
-rw-r--r--contrib/python/importlib-metadata/py3/importlib_metadata/compat/py311.py22
-rw-r--r--contrib/python/importlib-metadata/py3/ya.make3
4 files changed, 55 insertions, 30 deletions
diff --git a/contrib/python/importlib-metadata/py3/.dist-info/METADATA b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
index ec8a77c116..ed13bc60a6 100644
--- a/contrib/python/importlib-metadata/py3/.dist-info/METADATA
+++ b/contrib/python/importlib-metadata/py3/.dist-info/METADATA
@@ -1,40 +1,40 @@
Metadata-Version: 2.1
Name: importlib_metadata
-Version: 7.1.0
+Version: 7.2.1
Summary: Read metadata from Python packages
-Home-page: https://github.com/python/importlib_metadata
-Author: Jason R. Coombs
-Author-email: jaraco@jaraco.com
+Author-email: "Jason R. Coombs" <jaraco@jaraco.com>
+Project-URL: Source, https://github.com/python/importlib_metadata
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.8
+Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: typing-extensions >=3.6.4 ; python_version < "3.8"
-Provides-Extra: docs
-Requires-Dist: sphinx >=3.5 ; extra == 'docs'
-Requires-Dist: jaraco.packaging >=9.3 ; extra == 'docs'
-Requires-Dist: rst.linker >=1.9 ; extra == 'docs'
-Requires-Dist: furo ; extra == 'docs'
-Requires-Dist: sphinx-lint ; extra == 'docs'
-Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'docs'
+Provides-Extra: doc
+Requires-Dist: sphinx >=3.5 ; extra == 'doc'
+Requires-Dist: jaraco.packaging >=9.3 ; extra == 'doc'
+Requires-Dist: rst.linker >=1.9 ; extra == 'doc'
+Requires-Dist: furo ; extra == 'doc'
+Requires-Dist: sphinx-lint ; extra == 'doc'
+Requires-Dist: jaraco.tidelift >=1.4 ; extra == 'doc'
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-cov ; extra == 'testing'
-Requires-Dist: pytest-enabler >=2.2 ; extra == 'testing'
-Requires-Dist: pytest-ruff >=0.2.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: jaraco.test >=5.4 ; 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'
+Provides-Extra: test
+Requires-Dist: pytest !=8.1.*,>=6 ; extra == 'test'
+Requires-Dist: pytest-checkdocs >=2.4 ; extra == 'test'
+Requires-Dist: pytest-cov ; extra == 'test'
+Requires-Dist: pytest-mypy ; extra == 'test'
+Requires-Dist: pytest-enabler >=2.2 ; extra == 'test'
+Requires-Dist: pytest-ruff >=0.2.1 ; extra == 'test'
+Requires-Dist: packaging ; extra == 'test'
+Requires-Dist: pyfakefs ; extra == 'test'
+Requires-Dist: flufl.flake8 ; extra == 'test'
+Requires-Dist: pytest-perf >=0.9.2 ; extra == 'test'
+Requires-Dist: jaraco.test >=5.4 ; extra == 'test'
+Requires-Dist: importlib-resources >=1.3 ; (python_version < "3.9") and extra == 'test'
.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
:target: https://pypi.org/project/importlib_metadata
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
index b512d89d6e..579b9ce591 100644
--- a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
@@ -17,8 +17,8 @@ import itertools
import posixpath
import collections
-from . import _adapters, _meta
-from .compat import py39
+from . import _meta
+from .compat import py39, py311
from ._collections import FreezableDefaultDict, Pair
from ._compat import (
NullFinder,
@@ -466,6 +466,9 @@ class Distribution(DeprecatedNonAbstract):
Custom providers may provide the METADATA file or override this
property.
"""
+ # deferred for performance (python/cpython#109829)
+ from . import _adapters
+
opt_text = (
self.read_text('METADATA')
or self.read_text('PKG-INFO')
@@ -572,9 +575,8 @@ class Distribution(DeprecatedNonAbstract):
return
paths = (
- (subdir / name)
- .resolve()
- .relative_to(self.locate_file('').resolve())
+ py311.relative_fix((subdir / name).resolve())
+ .relative_to(self.locate_file('').resolve(), walk_up=True)
.as_posix()
for name in text.splitlines()
)
diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/compat/py311.py b/contrib/python/importlib-metadata/py3/importlib_metadata/compat/py311.py
new file mode 100644
index 0000000000..3a5327436f
--- /dev/null
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/compat/py311.py
@@ -0,0 +1,22 @@
+import os
+import pathlib
+import sys
+import types
+
+
+def wrap(path): # pragma: no cover
+ """
+ Workaround for https://github.com/python/cpython/issues/84538
+ to add backward compatibility for walk_up=True.
+ An example affected package is dask-labextension, which uses
+ jupyter-packaging to install JupyterLab javascript files outside
+ of site-packages.
+ """
+
+ def relative_to(root, *, walk_up=False):
+ return pathlib.Path(os.path.relpath(path, root))
+
+ return types.SimpleNamespace(relative_to=relative_to)
+
+
+relative_fix = wrap if sys.version_info < (3, 12) else lambda x: x
diff --git a/contrib/python/importlib-metadata/py3/ya.make b/contrib/python/importlib-metadata/py3/ya.make
index ecdc5d99ec..9f1a42353d 100644
--- a/contrib/python/importlib-metadata/py3/ya.make
+++ b/contrib/python/importlib-metadata/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(7.1.0)
+VERSION(7.2.1)
LICENSE(Apache-2.0)
@@ -19,6 +19,7 @@ PY_SRCS(
importlib_metadata/_meta.py
importlib_metadata/_text.py
importlib_metadata/compat/__init__.py
+ importlib_metadata/compat/py311.py
importlib_metadata/compat/py39.py
importlib_metadata/diagnose.py
)