Skip to content

Commit 1b3dfe6

Browse files
committed
bpo-29592: remove abs_paths() from site.py
It seems redundant for now.
1 parent d4d4874 commit 1b3dfe6

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

Lib/site.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,6 @@ def makepath(*paths):
9696
return dir, os.path.normcase(dir)
9797

9898

99-
def abs_paths():
100-
"""Set all module __file__ and __cached__ attributes to an absolute path"""
101-
for m in set(sys.modules.values()):
102-
if (getattr(getattr(m, '__loader__', None), '__module__', None) not in
103-
('_frozen_importlib', '_frozen_importlib_external')):
104-
continue # don't mess with a PEP 302-supplied __file__
105-
try:
106-
m.__file__ = os.path.abspath(m.__file__)
107-
except (AttributeError, OSError):
108-
pass
109-
try:
110-
m.__cached__ = os.path.abspath(m.__cached__)
111-
except (AttributeError, OSError):
112-
pass
113-
114-
11599
def removeduppaths():
116100
""" Remove duplicate entries from sys.path along with making them
117101
absolute"""
@@ -522,7 +506,6 @@ def main():
522506
"""
523507
global ENABLE_USER_SITE
524508

525-
abs_paths()
526509
known_paths = removeduppaths()
527510
known_paths = venv(known_paths)
528511
if ENABLE_USER_SITE is None:

0 commit comments

Comments
 (0)