-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added Python3 support (reliant on futures module) #13
base: master
Are you sure you want to change the base?
Added Python3 support (reliant on futures module) #13
Conversation
"sh", | ||
'mock==2.0.0', | ||
'sh==1.12.14', | ||
'future==0.16.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not __future__
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment about the "future" tool- it should mix in __future__
where required (in each Python file). I don't think you can install __future__
as a package, I believe it's a builtin.
tests/tests.py
Outdated
import unittest | ||
import mock | ||
from builtins import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here? from builtins import *
deserves an explanatory comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a byproduct of the "future" module- I should have explained the process a bit more.
It comes with a tool "futurize" that I've used across the code base (with the command futurize -0 -u -w -n -a
) that places a lot of this stuff at the top of each file; I haven't really questioned this, I can look at what's used and minimise the imports if you like.
fd965da
to
1840238
Compare
This PR refers to the following issue:
Consider adding Python3 support
It is to add Python3 support (while retaining Python2 support).
It relies on the "future" Python module and all unit tests pass under Python2.7, Python3.6, PyPy 5.10 and PyPy3 5.10.1.
Manual end-to-end testing against an actual Windows server seems fine under both Python2.7 and Python3.5 in an Ubuntu Docker container.