summaryrefslogtreecommitdiff
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2020-01-27 09:57:45 +0000
committerGitHub <noreply@github.com>2020-01-27 09:57:45 +0000
commit8a4cd700a7426341c2074a2b580306d2d60ec839 (patch)
tree64ff9fdc0361fe05e0ef5a2508e832a5de03b830 /Lib/importlib/_bootstrap_external.py
parent72b1004657e60c900e4cd031b2635b587f4b280e (diff)
downloadcpython-git-8a4cd700a7426341c2074a2b580306d2d60ec839.tar.gz
bpo-39320: Handle unpacking of **values in compiler (GH-18141)
* Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking. * Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused. * Update magic number for ** unpacking opcodes. * Update dis.rst to incorporate new bytecodes. * Add blurb entry.
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r--Lib/importlib/_bootstrap_external.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 6c703fa3f7..2434cf06fd 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -276,6 +276,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.9a0 3422 (remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY, POP_FINALLY bytecodes #33387)
# Python 3.9a2 3423 (add IS_OP, CONTAINS_OP and JUMP_IF_NOT_EXC_MATCH bytecodes #39156)
# Python 3.9a2 3424 (simplify bytecodes for *value unpacking)
+# Python 3.9a2 3425 (simplify bytecodes for **value unpacking)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
@@ -285,7 +286,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
-MAGIC_NUMBER = (3424).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3425).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'