summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-23 17:30:08 (GMT)
committerGitHub <noreply@github.com>2024-06-23 17:30:08 (GMT)
commit6be1048e27f1f2eb35c45d17f3bb8760ec694550 (patch)
tree25a987e84594f51cc009409b82f22340d60afb53 /Lib/importlib
parentd6791cd9338e08a5b51d77e16009393f3781a4b5 (diff)
downloadcpython-6be1048e27f1f2eb35c45d17f3bb8760ec694550.zip
cpython-6be1048e27f1f2eb35c45d17f3bb8760ec694550.tar.gz
cpython-6be1048e27f1f2eb35c45d17f3bb8760ec694550.tar.bz2
[3.13] gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911) (#120917)
gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911) Incorporates changes from importlib_metadata 7.2.1. (cherry picked from commit 1ba0bb21ed4eb54023fdfccc9cb20be8fff946b1) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/metadata/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py
index 245f905..8ce62dd 100644
--- a/Lib/importlib/metadata/__init__.py
+++ b/Lib/importlib/metadata/__init__.py
@@ -567,7 +567,7 @@ class Distribution(DeprecatedNonAbstract):
paths = (
(subdir / name)
.resolve()
- .relative_to(self.locate_file('').resolve())
+ .relative_to(self.locate_file('').resolve(), walk_up=True)
.as_posix()
for name in text.splitlines()
)