summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/util.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2013-06-16 22:37:53 (GMT)
committerBrett Cannon <brett@python.org>2013-06-16 22:37:53 (GMT)
commitf24fecd4ac9050799d02a8354b7acfa12b65b1d3 (patch)
tree332e7e70c73bfbe61754e95a173aadbbe6e004a4 /Lib/importlib/util.py
parentf4375ef4d458bf24610ffef591f8197a3dbf0b35 (diff)
downloadcpython-f24fecd4ac9050799d02a8354b7acfa12b65b1d3.zip
cpython-f24fecd4ac9050799d02a8354b7acfa12b65b1d3.tar.gz
cpython-f24fecd4ac9050799d02a8354b7acfa12b65b1d3.tar.bz2
Issue #18076: Introduce imoportlib.util.decode_source().
The helper function makes it easier to implement imoprtlib.abc.InspectLoader.get_source() by making that function require just the raw bytes for source code and handling all other details.
Diffstat (limited to 'Lib/importlib/util.py')
-rw-r--r--Lib/importlib/util.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index 06f4d2f..7727f9d 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -2,6 +2,7 @@
from ._bootstrap import MAGIC_NUMBER
from ._bootstrap import cache_from_source
+from ._bootstrap import decode_source
from ._bootstrap import module_to_load
from ._bootstrap import set_loader
from ._bootstrap import set_package