Skip to content

Commit d125f87

Browse files
committed
fix build on pre-3.13 Pythons
1 parent 252a12b commit d125f87

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/opcode.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
"stack_effect", "HAVE_ARGUMENT", "EXTENDED_ARG"]
1010

1111
from _opcode import stack_effect
12-
from _opcode_metadata import _specializations, _specialized_instructions
12+
13+
import sys
14+
# The build uses older versions of Python which do not have _opcode_metadata
15+
if sys.version_info[:2] >= (3, 13):
16+
from _opcode_metadata import _specializations, _specialized_instructions
1317

1418
cmp_op = ('<', '<=', '==', '!=', '>', '>=')
1519

0 commit comments

Comments
 (0)