Added Python3 support (reliant on futures module)#13
Open
initialed85 wants to merge 1 commit into
Open
Conversation
kanzure
reviewed
Apr 25, 2018
| "sh", | ||
| 'mock==2.0.0', | ||
| 'sh==1.12.14', | ||
| 'future==0.16.0', |
Author
There was a problem hiding this comment.
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.
kanzure
reviewed
Apr 25, 2018
| import os | ||
| import unittest | ||
| import mock | ||
| from builtins import * |
Owner
There was a problem hiding this comment.
What's going on here? from builtins import * deserves an explanatory comment.
Author
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.