byterun
byterun copied to clipboard
Does not support Python 3.6
It throws IndexError: tuple index out of range
.
Traceback (most recent call last):
File "python.py", line 176, in <module>
""")
File "python.py", line 166, in exec_python
vm_value = vm.run_code(code)
File "/usr/lib/python3.6/site-packages/byterun/pyvm2.py", line 145, in run_code
val = self.run_frame(frame)
File "/usr/lib/python3.6/site-packages/byterun/pyvm2.py", line 318, in run_frame
byteName, arguments, opoffset = self.parse_byte_and_args()
File "/usr/lib/python3.6/site-packages/byterun/pyvm2.py", line 182, in parse_byte_and_args
arg = f.f_code.co_consts[intArg]
IndexError: tuple index out of range
Actually, the intArg
has become incredibly large, like 23040. I guess the format of the bytecode has changed.
@Axure did you find any solution?
Python 3.6 bytecode is very different. It uses two bytes for every instruction instead of a mix of one and three byte instructions. For more info on this change see: https://bugs.python.org/issue26647
I am working on py36 support here: https://github.com/vrthra/byterun/tree/py36
The byte code changes are easily fixable (in the branch above), but adding new opcodes is taking time.
@vrthra See https://github.com/rocky/x-python/blob/master/xpython/byteop/byteop35.py https://github.com/rocky/x-python/blob/master/xpython/byteop/byteop36.py and https://github.com/rocky/x-python/blob/master/xpython/byteop/byteop37.py for most of the new byteops. 3.5 WITH_CLEANUP_{START,FINISH}
are half working, and some of the new async
opcodes are lagging, but the most used new operations are in there.