Skip to content

Cross compatible #2

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

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

Conversation

ryanfitz514
Copy link
Contributor

@speedplane I used the resources you provided and I have everything working on my end for both Python 3.8.2 and Python 2.7.18. I couldn't get the program to throw any errors while using either of the interpreters.

I ran two cross-compatibility scripts on the py files. Modernize and Future.

The scripts added an eval() function to the input statements, this made the script crash any time I would input text. Removing eval() allowed me to input text on both versions with no issues.

The other main change that had to be made manually was putting the urlargs variable inside of the six.b() function to specify encoding manually. It would not run on Python 3 without this. I'll include documentation.

Lastly, I changed all mentions of the async variable in client.py to _async. It appears that async is a reserved keyword in Python 3 and It would not run without changing it.

Docs:

…ents had to be changed manually because eval() function wrapped around them broke everything. Encoding had to be specified manually with six.b on line 100 of client.py.
Copy link
Contributor

@speedplane speedplane left a comment

Choose a reason for hiding this comment

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

Hi @ryanfitz514 two very minor nit changes...

@ryanfitz514
Copy link
Contributor Author

@speedplane I just tested the script on both versions of Python without the redundant parentheses and they are working. It looks like the modernize and future scripts caused that.

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.

2 participants