mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
A few more docstring/API cleanups for importlib.
This commit is contained in:
parent
0e0d8a63b1
commit
7aa21f75c1
4 changed files with 55 additions and 53 deletions
|
|
@ -26,20 +26,6 @@ import os
|
|||
import re
|
||||
import tokenize
|
||||
|
||||
# XXX Temporary functions that should eventually be removed.
|
||||
def _set__import__():
|
||||
"""Set __import__ to an instance of Import."""
|
||||
global original__import__
|
||||
original__import__ = __import__
|
||||
__builtins__['__import__'] = _bootstrap._import
|
||||
|
||||
|
||||
def _reset__import__():
|
||||
"""Set __import__ back to the original implementation (assumes
|
||||
_set__import__ was called previously)."""
|
||||
__builtins__['__import__'] = original__import__
|
||||
|
||||
|
||||
# Bootstrap help #####################################################
|
||||
|
||||
def _case_ok(directory, check):
|
||||
|
|
@ -116,7 +102,7 @@ marshal._r_long = _r_long
|
|||
|
||||
# Public API #########################################################
|
||||
|
||||
__import__ = _bootstrap._import
|
||||
from ._bootstrap import __import__
|
||||
|
||||
|
||||
def import_module(name, package=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue