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

Python3 support #70

Open
gloomy-ghost opened this issue Nov 2, 2016 · 15 comments
Open

Python3 support #70

gloomy-ghost opened this issue Nov 2, 2016 · 15 comments

Comments

@gloomy-ghost
Copy link

Hi, this repository looks really interesting.

I was wondering would you consider to support python3?

@hanbinpro
Copy link

+1

3 similar comments
@THMonster
Copy link

+1

@argolo
Copy link

argolo commented May 28, 2018

+1

@XCanG
Copy link

XCanG commented Jun 17, 2018

+1

@dsolmann
Copy link

dsolmann commented Sep 30, 2018

+1

@fionafibration
Copy link

This needs to be a thing.

@stevenjoezhang
Copy link

+1

@cplir-c
Copy link

cplir-c commented Jul 19, 2019

Would this look like a fork, auto-detecting the Python version, a command line flag, or what?
Would be be possible to write this so it's runnable in Python 2 or 3?
Also, I noticed that the ContextDecorator class could help with rewriting with statements for Python 3.

@csvoss
Copy link
Owner

csvoss commented Jun 6, 2020

Command-line flag, most likely!

@ehannigan
Copy link

Turns out onelinerizing is great for obfuscating autograders to pass out to students for virtual classes. We were using it last year, but this year we are switching all of our assignments to python 3. Because onelinerizing is so convenient, I'm gonna try and see if I can get basic functionality working for python 3.

I've forked the repo here: https://github.com/ehannigan/onelinerizer

For anyone who is interested, I would be very appreciative of help. If we can get it to work in the fork, we can merge it back here as a python3 version. (@csvoss , Is this the right way to make changes? If not, let me know and I will follow whatever development style you want to use for this repo).

@csvoss
Copy link
Owner

csvoss commented Sep 14, 2020

Amazing!

Yes, I accept pull requests! I don't have any formal guidelines or anything – happy to give feedback and help iterate on any PRs.

@ehannigan
Copy link

Got the errors down to 32/113 (compared to 113/113 yesterday) by fixing the lowest hanging fruit.

I am not 100% sure these fixes have not led to other issues. It works on a very simple chunk of code for my autograder, so it's a good start. I'm slowly beginning to wrap my head around everything. I think the last 32 errors are going to be more difficult.

I'll keep updating on progress

@Hendiadyoin1
Copy link

Any movements on this?

@Hendiadyoin1
Copy link

I've tried the current state of the fork, it seems to work for the provided examples, but definitely does not like django throwing an ast Error: "Case not cought"

@hhc97
Copy link

hhc97 commented Feb 11, 2023

Hey! If any of you are still interested in python3 support, I made my own version of this project called Flatliner with a demo website at https://flatliner.herokuapp.com/.

It's not as full featured as this project though (this project was excellent), I have no support for things like try-except, scope modifiers like global, nonlocal, etc, but it can convert a good number of python3 programs. The source code is also available here.

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

14 participants