bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302)

* bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE

* do not assume that an exception group is truthy
This commit is contained in:
Irit Katriel 2022-01-04 10:37:12 +00:00 committed by GitHub
parent a09062c267
commit a94461d718
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 138 additions and 146 deletions

View file

@ -376,6 +376,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.11a4 3468 (Add SEND opcode)
# Python 3.11a4 3469 (bpo-45711: remove type, traceback from exc_info)
# Python 3.11a4 3470 (bpo-46221: PREP_RERAISE_STAR no longer pushes lasti)
# Python 3.11a4 3471 (bpo-46202: remove pop POP_EXCEPT_AND_RERAISE)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
@ -385,7 +386,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 = (3470).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3471).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'