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

Upgrade to Python 3 #34

Open
RobotSail opened this issue Feb 9, 2024 · 3 comments
Open

Upgrade to Python 3 #34

RobotSail opened this issue Feb 9, 2024 · 3 comments

Comments

@RobotSail
Copy link

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
Copy link

Xiaoven commented Mar 14, 2024

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
Copy link
Author

@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
Copy link

Xiaoven commented Mar 16, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants