8000 [3.11] GH-93516: Backport GH-93769 by markshannon · Pull Request #94231 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] GH-93516: Backport GH-93769 #94231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit 8000
Hardcode RESUME opcode in deepfreeze, to break dependency on exact ve…
…rsion of Python used.
  • Loading branch information
markshannon committed Jun 24, 2022
commit 71dd6c84fa29f75f2cd62075d5baf7b9df5b3f03
2 changes: 1 addition & 1 deletion Lib/opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def jabs_op(name, op):
hasfree.append(148)
def_op('COPY_FREE_VARS', 149)

def_op('RESUME', 151)
def_op('RESUME', 151) # This must be kept in sync with deepfreeze.py
def_op('MATCH_CLASS', 152)

def_op('FORMAT_VALUE', 155)
Expand Down
5 changes: 2 additions & 3 deletions Tools/scripts/deepfreeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import collections
import contextlib
import os
import opcode
import re
import time
import types
Expand All @@ -23,8 +22,8 @@
verbose = False
identifiers, strings = get_identifiers_and_strings()

RESUME = opcode.opmap["RESUME"]
del opcode
# This must be kept in sync with opcode.py
RESUME = 151

def isprintable(b: bytes) -> bool:
return all(0x20 <= c < 0x7f for c in b)
Expand Down
0