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

rtrip.py: convert to python3 #192

Closed
wants to merge 1 commit into from

Conversation

Mingli-Yu
Copy link

As Python 2 reached end of life (EOL), so convert rtrip.py to python3.

Signed-off-by: Mingli Yu [email protected]

As Python 2 reached end of life (EOL), so convert rtrip.py to python3.

Signed-off-by: Mingli Yu <[email protected]>
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this line isn't needed and can be removed.

@@ -160,7 +160,7 @@ def usage(msg):

Usage:

python -m astor.rtrip [readonly] [<source>]
python3 -m astor.rtrip [readonly] [<source>]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

astor still supports Python 2.7 (it will be dropped in either 0.9 or 1.0) and python may still point to Python 3 especially if astor is installed inside a virtual environment. I'd prefer keeping it as for now.

It would be nice to use argparse instead of the current solution, though.

@cclauss
Copy link
Contributor

cclauss commented Jun 25, 2022

tests/test_rtrip.py seems to fail for me on Python 3 in #208

@berkerpeksag berkerpeksag mentioned this pull request Jan 1, 2025
18 tasks
@berkerpeksag
Copy link
Owner

The new Astor release will drop Python 2 support, but it requires more work than just astor.rtip. I'll deal with it as part of PR #229. Thank you for your PR!

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

Successfully merging this pull request may close these issues.

3 participants