MatthieuDartiailh / bytecode

Python module to modify bytecode
https://bytecode.readthedocs.io/
MIT License
302 stars 38 forks source link

Support for Python 2 #5

Closed MatthieuDartiailh closed 8 years ago

MatthieuDartiailh commented 8 years ago

Hi,

I would be interested in adding support for Python 2 bytecode to be able to use bytecode in a project that must retain 2/3compatibility and for which the better Python 3 support provided by bytecode would be interesting.

Would you merge such a PR and do you have any advice as to how structure the code ?

Thanks

vstinner commented 8 years ago

I would prefer to see the size of the patch required to support Python 2, before accepting any change in this direction.

Not supporting Python 2 is a deliberate choice to use the cool syntax of Python 3 for the source code of bytecode itself.

MatthieuDartiailh commented 8 years ago

This makes sense. I will focus on the stack depth first to get a bit more familiar with the code. I will move to Python 2 support only next.

P403n1x87 commented 3 years ago

@MatthieuDartiailh I would be interested in any potential investigation outcomes regarding Python 2 support. Did you manage to figure out the amount of work required?

MatthieuDartiailh commented 3 years ago

Now that we are well past Python 2 EOL, I have no interest anymore in Python 2 I must say. I even dropped support for Python < 3.6 in the current main (but I messed up the commit message badly...)