Skip to content
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

Does not support Python 3.6 #29

Open
Axure opened this issue Jul 26, 2017 · 4 comments
Open

Does not support Python 3.6 #29

Axure opened this issue Jul 26, 2017 · 4 comments

Comments

@Axure
Copy link

Axure commented Jul 26, 2017

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.

@canorbal
Copy link

@Axure did you find any solution?

@llllllllll
Copy link
Collaborator

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

@vrthra
Copy link

vrthra commented Jan 30, 2018

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.

@rocky
Copy link

rocky commented May 7, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants