skyhover / Deckard

Code clone detection; clone-related bug detection; sematic clone analysis
Other
209 stars 78 forks source link

Upgrade to Python 3 #34

Open RobotSail opened 5 months ago

RobotSail commented 5 months ago

Most of the Yacc parser (and maybe other portions) were written in Python 2. Since Python 2 was deprecated in 2020, we should update the codebase to use Python 3.

Xiaoven commented 4 months ago

To add, Python 2.7 was discontinued before the osx-arm64 platform was released, so no such build exists. Therefore python 2 scripts are very unfriendly to users of MacOS built on Apple chips

RobotSail commented 4 months ago

@Xiaoven As a workaround for the time being, it looks like you can compile by using Docker and building for amd64 from the python:2 image and running in in x86 mode w/ amd64 emulation mode enabled.

Xiaoven commented 4 months ago

@Xiaoven As a workaround for the time being, it looks like you can compile by using Docker and building for amd64 from the python:2 image and running in in x86 mode w/ amd64 emulation mode enabled.

I addressed the issue using the 2to3 tool and manually corrected a few errors stemming from type removal in Python 3, such as the usage of isinstance(var, file). Throughout the process, ChatGPT provided invaluable assistance by offering solutions and guidance.