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

Add Python 3.11 opcodes and support 3.11 #98

Closed
rocky opened this issue Nov 12, 2022 · 9 comments
Closed

Add Python 3.11 opcodes and support 3.11 #98

rocky opened this issue Nov 12, 2022 · 9 comments

Comments

@rocky
Copy link
Owner

rocky commented Nov 12, 2022

Description

Add support for Python 3.11

Background

Python 3.11 is out!

Tests

After adding opcode and adjusting:

make check
@rocky rocky changed the title Add Python 3.11 opcodes and support 3.22 Add Python 3.11 opcodes and support 3.11 Nov 12, 2022
@Anutrix
Copy link

Anutrix commented Apr 2, 2023

In order to add support for 3.11, one would need to read and understand https://docs.python.org/3.11/whatsnew/3.11.html#cpython-bytecode-changes and create file called xdis/opcodes/opcode_311.py with necessary data, correct?
I will try to do it if I can.

One more doubt: When using uncompyle6 installed on a system with python 3.11 but de-compiling older pyc(from e.g, 3.10), the KeyError is still says 3.11.x. Is this expected? Shouldn't it either work or complain about 3.10 KeyError?
Is it because uncompyle6 can't determine the version before de-compilation can be done?

@rocky
Copy link
Owner Author

rocky commented Apr 2, 2023

Shouldn't it either work or complain about 3.10 KeyError?
Is it because uncompyle6 can't determine the version before de-compilation can be done?

If you'd like to work up a solution here for uncompyle6, please do.

@Sirin112
Copy link

I lost my code accidently, and really need xdis support for Python 3.11, I can pay for it ! plzzzzzzzzzzzzzzz !

@rocky
Copy link
Owner Author

rocky commented Jul 31, 2023

@Sirin112 There is preliminary support for 3.11 in the master branch. If that does not do it for you, make a reasonable donation to the project and send me the bytecode and I will send back a disassembly of your bytecode.

@Sirin112
Copy link

Sirin112 commented Aug 1, 2023

it shows that Unknown magic number 227,how much could be a reasonable donation? will $150 be enough?

@rocky
Copy link
Owner Author

rocky commented Aug 1, 2023

it shows that Unknown magic number 227,how much could be a reasonable donation? will $150 be enough?

Something is weird then. If you donate $150 I will spend about 1/2 hour on it. After making the donation you can send the bytecode to python.decompiler39plus@gmail.com

@martindemello
Copy link

pycnite has 3.11 support. you likely won't be able to import and use it in xdis because it requires python >= 3.8 to run but you're welcome to copy code from it.

@rocky
Copy link
Owner Author

rocky commented Oct 6, 2023

So everyone knows where things stand...

@2elli added 3.11 of opcode support in #112 #113 among others and I added better unmarshaling #119 .

Python version independent line number table disassembly (or better since 3.11 can do better) still needs doing, although if you disassemble 3.11 pyc from 3.11 that works.

@rocky
Copy link
Owner Author

rocky commented Oct 13, 2023

Thanks to @2elli @caandt and @jdw170000 , I think we can call this done.

@rocky rocky closed this as completed Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants