rocky / python-xdis

Python cross-version bytecode library and disassembler
GNU General Public License v2.0
292 stars 95 forks source link

Remove 3.6+ type annotation #86

Closed jacobcrigby closed 3 years ago

jacobcrigby commented 3 years ago

This causes installation using pip to fail, a regression from 5.0.12. It looks like the change was made in https://github.com/rocky/python-xdis/commit/154e85761681ca61ee350b86ab85efd90b37e9ab which itself is a reversion of https://github.com/rocky/python-xdis/commit/5fc383dbe3fe75be11cbfd0f3762ecc746982732.

jacobcrigby commented 3 years ago

I found this when trying to install https://github.com/rocky/python-uncompyle6/ on 2.7. I'm normally on 3.7+, but was dealing with an old library that still hasn't been updated with 3.x compatibility.

rocky commented 3 years ago

This causes installation using pip to fail, a regression from 5.0.12. It looks like the change was made in 154e857 which itself is a reversion of 5fc383d.

Things have changed a bit with respect to how running from older versions of Python work. If you want to run on Python 2.7 nowadays you should be using code from the python-2.4-to-2.7 branch, not master. If you install from the eggs then things are ok.

There was a mistake in that release in that the wheel also allows Python2 installation.

Over the weekend there will be a major update to be able to handle Python 3.10, as well as fix a long-standing problem where I was using a floating point number internally to check version-ness. (In Python 3.10 this clearly no longer works).

In that release I'll make sure the wheel doesn't allow installation from Python2.

rocky commented 3 years ago

Commit b6ee7c8 should address this in master (3.6-3.10). There will be other commits in the other branches for the other versions.