summaryrefslogtreecommitdiff
path: root/Lib/importlib/_bootstrap.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-04-30 09:41:40 -0400
committerBenjamin Peterson <benjamin@python.org>2013-04-30 09:41:40 -0400
commita2fc2ebe3d645e60d26996b51d8b33a1fe177d5c (patch)
tree1ea3e6bd538e2171a60e96ba1656a3457e129599 /Lib/importlib/_bootstrap.py
parentc6666f2ecc6dfd60aa6fe88950c5dfb2eb8d6687 (diff)
downloadcpython-a2fc2ebe3d645e60d26996b51d8b33a1fe177d5c.tar.gz
check local class namespace before reaching for cells (closes #17853)
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r--Lib/importlib/_bootstrap.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 77c14bc725..1a046c5957 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -388,12 +388,14 @@ def _call_with_frames_removed(f, *args, **kwds):
# Python 3.3a4 3230 (revert changes to implicit __class__ closure)
# Python 3.4a1 3250 (evaluate positional default arguments before
# keyword-only defaults)
+# Python 3.4a1 3260 (add LOAD_CLASSDEREF; allow locals of class to override
+# free vars)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
# due to the addition of new opcodes).
-_MAGIC_BYTES = (3250).to_bytes(2, 'little') + b'\r\n'
+_MAGIC_BYTES = (3260).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(_MAGIC_BYTES, 'little')
_PYCACHE = '__pycache__'