Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(40063)

Unified Diff: Lib/importlib/_bootstrap_external.py

Issue 27095: Simplify MAKE_FUNCTION
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Lib/importlib/_bootstrap_external.py Sun Jun 12 15:53:09 2016 +0300
+++ b/Lib/importlib/_bootstrap_external.py Sun Jun 12 16:28:15 2016 +0300
@@ -130,10 +130,6 @@ def _write_atomic(path, data, mode=0o666
# a .pyc file in text mode the magic number will be wrong; also, the
# Apple MPW compiler swaps their values, botching string constants.
#
-# The magic numbers must be spaced apart at least 2 values, as the
-# -U interpeter flag will cause MAGIC+1 being used. They have been
-# odd numbers for some time now.
-#
# There were a variety of old schemes for setting the magic number.
# The current working scheme is to increment the previous value by
# 10.
@@ -226,8 +222,9 @@ def _write_atomic(path, data, mode=0o666
# Python 3.5.2 3351 (fix BUILD_MAP_UNPACK_WITH_CALL opcode #27286)
# Python 3.6a0 3360 (add FORMAT_VALUE opcode #25483
# Python 3.6a0 3361 (lineno delta of code.co_lnotab becomes signed)
-# Python 3.6a0 3370 (16 bit wordcode)
-# Python 3.6a0 3371 (add BUILD_CONST_KEY_MAP opcode #27140)
+# Python 3.6a1 3370 (16 bit wordcode)
+# Python 3.6a1 3371 (add BUILD_CONST_KEY_MAP opocode #27140)
+# Python 3.6a1 3372 (MAKE_FUNCTION simplification)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
@@ -236,7 +233,7 @@ def _write_atomic(path, data, mode=0o666
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
-MAGIC_NUMBER = (3371).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3372).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+