gh-99254: remove all unused consts from code objects (GH-99255)

This commit is contained in:
Irit Katriel 2022-11-11 10:53:43 +00:00 committed by GitHub
parent faf7dfa656
commit 3dd6ee2c00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 142 additions and 33 deletions

View file

@ -425,6 +425,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.12a1 3509 (Conditional jumps only jump forward)
# Python 3.12a1 3510 (FOR_ITER leaves iterator on the stack)
# Python 3.12a1 3511 (Add STOPITERATION_ERROR instruction)
# Python 3.12a1 3512 (Remove all unused consts from code objects)
# Python 3.13 will start with 3550
@ -437,7 +438,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 = (3511).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3512).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c