Makes rest2html work in both Python2 and Python3#919
Merged
kivikakk merged 2 commits intogithub:masterfrom Mar 16, 2017
Merged
Conversation
Contributor
Author
|
I'm not signing a CLA, as the only file I've changed is under http://creativecommons.org/publicdomain/zero/1.0/ which I here agree to license the submitted changes with. |
anarcat
reviewed
Sep 18, 2016
lib/github/commands/rest2html
Outdated
| input_stream = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8') | ||
| text = input_stream.read() | ||
| else: # python 2 | ||
| text = sys.stdin.read() |
There was a problem hiding this comment.
note that i've submitted that one to the python-future website to see what the best idiom would be according to them: PythonCharmers/python-future#241
This code will keep current behavior for python 2.x.
360873d to
62ff599
Compare
Contributor
|
@brodock I checked with legal just to be sure, and this is all good sans CLA under CC0. Thanks for the PR! 🙇♀️ |
brasic
pushed a commit
that referenced
this pull request
Mar 30, 2021
#919 added support for python3, but we still explicitly shell out to the `python2` executable. Let's switch to python3 now that it's supported. This bumps the major version because it's a breaking change for anyone running in an environment with only python2.
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 is a step further supporting Python3 environments. For anyone trying to run this with Python3, you still need to either change the hardcoded
python2topython3in command definition inmarkups.rbor symlink yourenv python2to point to python3.Ideally this should also be made configurable.