colesbury / nogil

Multithreaded Python without the GIL
Other
2.91k stars 107 forks source link

Missing Instruction.arg from dis.py and some operations from opcode.py #123

Open hzhan147 opened 1 year ago

hzhan147 commented 1 year ago

Just compiled and am ready to use the nogil Python and realized the Python variant won't work with any libraries that use dis.py and/or opcode.py.

For example: In Js2Py library, https://github.com/PiotrDabkowski/Js2Py/blob/master/js2py/utils/injector.py#L85, It uses Instruction obj from the dis.py and explicitly uses the attribute 'arg'.

Are we planning to add functions and attributes back to dis.py and opcode.py?

Thanks for reading!

colesbury commented 1 year ago

Hi @hzhan147 - this version modifies the bytecode format, which leads to some incompatibilities as you have found. These changes are not part of PEP 703 and will not be integrated upstream, but I'm also not going back to change them here as I'm focused on integration upstream into Python 3.13.