summaryrefslogtreecommitdiffstats
path: root/Lib/imp.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-05-04 17:52:49 (GMT)
committerBrett Cannon <brett@python.org>2012-05-04 17:52:49 (GMT)
commit17098a5447f8bc742023b39eb7d8ef141beed119 (patch)
tree06213e5dce80b7a8e501279fb55b4ec2c8a7a91e /Lib/imp.py
parentfbd85a0fbf99d100983fdcf3e02fef8b2f4e481a (diff)
downloadcpython-17098a5447f8bc742023b39eb7d8ef141beed119.zip
cpython-17098a5447f8bc742023b39eb7d8ef141beed119.tar.gz
cpython-17098a5447f8bc742023b39eb7d8ef141beed119.tar.bz2
Properly mark names in importlib._bootstrap as private.
Diffstat (limited to 'Lib/imp.py')
-rw-r--r--Lib/imp.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/imp.py b/Lib/imp.py
index 2c46e7a..8f67200 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -15,8 +15,8 @@ from _imp import get_magic, get_tag
# Can (probably) move to importlib
from _imp import get_suffixes
-from importlib._bootstrap import _new_module as new_module
-from importlib._bootstrap import _cache_from_source as cache_from_source
+from importlib._bootstrap import new_module
+from importlib._bootstrap import cache_from_source
from importlib import _bootstrap
import os
@@ -48,14 +48,14 @@ def source_from_cache(path):
"""
head, pycache_filename = os.path.split(path)
head, pycache = os.path.split(head)
- if pycache != _bootstrap.PYCACHE:
+ if pycache != _bootstrap._PYCACHE:
raise ValueError('{} not bottom-level directory in '
- '{!r}'.format(_bootstrap.PYCACHE, path))
+ '{!r}'.format(_bootstrap._PYCACHE, path))
if pycache_filename.count('.') != 2:
raise ValueError('expected only 2 dots in '
'{!r}'.format(pycache_filename))
base_filename = pycache_filename.partition('.')[0]
- return os.path.join(head, base_filename + _bootstrap.SOURCE_SUFFIXES[0])
+ return os.path.join(head, base_filename + _bootstrap._SOURCE_SUFFIXES[0])
class NullImporter:
@@ -185,7 +185,7 @@ def find_module(name, path=None):
for entry in path:
package_directory = os.path.join(entry, name)
- for suffix in ['.py', _bootstrap.BYTECODE_SUFFIX]:
+ for suffix in ['.py', _bootstrap._BYTECODE_SUFFIX]:
package_file_name = '__init__' + suffix
file_path = os.path.join(package_directory, package_file_name)
if os.path.isfile(file_path):