Cross compatible #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@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:
https://six.readthedocs.io/
For the six.b() function
https://python-future.org/compatible_idioms.html
https://pypi.org/project/future/
Script similar to modernize that I also ran on the py files
https://intellipaat.com/community/32801/input-error-nameerror-name-is-not-defined
Where I found the solution to the crashes on the input() calls
[Python] "async" is now a reserved keyword in Python 3.7 swagger-api/swagger-codegen#8328
Where I found out about async keyword causing crashes