Skip to content

bpo-29592: site: skip abs_paths() when it's redundant #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-29592: remove abs_paths() from site.py
It seems redundant for now.
  • Loading branch information
methane committed Feb 19, 2017
commit 1b3dfe641f9b2b1c10c8eb82e65c103b6e8c0550
17 changes: 0 additions & 17 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,6 @@ def makepath(*paths):
return dir, os.path.normcase(dir)


def abs_paths():
"""Set all module __file__ and __cached__ attributes to an absolute path"""
for m in set(sys.modules.values()):
if (getattr(getattr(m, '__loader__', None), '__module__', None) not in
('_frozen_importlib', '_frozen_importlib_external')):
continue # don't mess with a PEP 302-supplied __file__
try:
m.__file__ = os.path.abspath(m.__file__)
except (AttributeError, OSError):
pass
try:
m.__cached__ = os.path.abspath(m.__cached__)
except (AttributeError, OSError):
pass


def removeduppaths():
""" Remove duplicate entries from sys.path along with making them
absolute"""
Expand Down Expand Up @@ -522,7 +506,6 @@ def main():
"""
global ENABLE_USER_SITE

abs_paths()
known_paths = removeduppaths()
known_paths = venv(known_paths)
if ENABLE_USER_SITE is None:
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy