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

Python Version #25

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Python Version #25

wants to merge 6 commits into from

Conversation

vmuriart
Copy link

Removes compatibility to versions older than 3.6 and uses some of the new features.

I didn't implement them throughout the code since it would require a few sections of the code to be refactored in order to use them to their full extent. So this is more of a preview 😄

Copy link
Owner

@dlenski dlenski left a comment

Choose a reason for hiding this comment

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

Thanks! (As discussed in #18.)

I realized that there are probably some folks using wtf on ancient systems where there's no default Python 3.6+, or even no default Python 3.0+ (cough RHEL/CentOS 6 cough 💩).

I created a python27 branch (currently matching master), and we should add a bit of documentation explaining how to install this with Python 2.7 where needed.

@vmuriart
Copy link
Author

Thanks! (As discussed in #18.)

I realized that there are probably some folks using wtf on ancient systems where there's no default Python 3.6+, or even no default Python 3.0+ (cough RHEL/CentOS 6 cough 💩).

I created a python27 branch (currently matching master), and we should add a bit of documentation explaining how to install this with Python 2.7 where needed.

what is the default version of Python in CentOS 6? Seems like it is 2.7, but i havent found anything concrete for it

@dlenski
Copy link
Owner

dlenski commented Jun 17, 2021

what is the default version of Python in CentOS 6? Seems like it is 2.7, but i havent found anything concrete for it

Yep, that's what it is on all the ancient CentOS 6 servers which I've ever had the misfortune of using 😂. (No wait, I think one of them only had 2.6 but 💩.)

Ubuntu 16.04/xenial is the other common-but-ancient distribution which doesn't have Python 3.6+ (it has Python 3.5). I believe that everything in here except f""-strings will work with Python 3.5.

@vmuriart
Copy link
Author

I was just about to say, that if we remove the f-strings, it can remain 3.5 compatible. And the only thing missing for 2.7 would be for them to install the backport of pathlib.
I can edit the PR to remove f-strings and add a try/except for the backport of pathlib if 2.7 users want to try to use a newer version of wtf

@@ -1,10 +1,11 @@
#!/usr/bin/env python

Choose a reason for hiding this comment

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

I would change python to python3 here. See #26.

@DimitriPapadopoulos
Copy link

DimitriPapadopoulos commented Oct 7, 2022

Perhaps change or remove this sentence from the README?

It should run correctly with either Python 2.7 or 3.x.

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.

None yet

3 participants