@@ -155,11 +155,12 @@ def asm_file(path):
155
155
line [len ("# Python bytecode " + pypy_str ) :].strip ().split ()[0 ]
156
156
)
157
157
158
- python_version_pair = version_str_to_tuple (version , len = 2 )
158
+ python_version_pair = version_str_to_tuple (version , length = 2 )
159
159
asm = Assembler (python_version_pair , is_pypy )
160
160
if python_version_pair >= (3 , 10 ):
161
161
TypeError (
162
- f"Creating Python version { python_version } not supported yet. Feel free to fix and put in a PR.\n "
162
+ f"Creating Python version { python_version } not supported yet. "
163
+ "Feel free to fix and put in a PR.\n "
163
164
)
164
165
asm .code_init (python_version_pair )
165
166
bytecode_seen = True
@@ -176,7 +177,7 @@ def asm_file(path):
176
177
backpatch_inst = set ([])
177
178
methods [method_name ] = co
178
179
offset = 0
179
- python_version_pair = version_str_to_tuple (version , len = 2 )
180
+ python_version_pair = version_str_to_tuple (version , length = 2 )
180
181
asm .code_init (python_version_pair )
181
182
asm .code .co_name = line [len ("# Method Name: " ) :].strip ()
182
183
method_name = asm .code .co_name
@@ -465,7 +466,7 @@ def create_code(asm, label, backpatch):
465
466
elif is_int (inst .arg ):
466
467
if inst .opcode == asm .opc .EXTENDED_ARG :
467
468
extended_value += inst .arg
468
- if asm .opc .version >= 3.6 :
469
+ if asm .opc .version_tuple >= ( 3 , 6 ) :
469
470
extended_value <<= 8
470
471
else :
471
472
extended_value <<= 16
0 commit comments