SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option#605
Merged
theacodes merged 3 commits intopypa:masterfrom Mar 30, 2019
paulmelnikow:patch-2
Merged
SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option#605theacodes merged 3 commits intopypa:masterfrom paulmelnikow:patch-2
theacodes merged 3 commits intopypa:masterfrom
paulmelnikow:patch-2
Conversation
Thanks for this guide! I was using this and tried `execfile()` without realizing it didn't work in Python 3. I thought about leaving the Python 2 version here with a disclaimer, though this list is already very long, and it seems more helpful to steer people toward a good solution than to exhaustively document an obsolete solution.
theacodes
reviewed
Mar 29, 2019
Co-Authored-By: paulmelnikow <github@paulmelnikow.com>
webknjaz
approved these changes
Mar 29, 2019
Member
|
Thanks, @paulmelnikow! |
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.
Thanks for this guide! I was using this and tried
execfile()without realizing it didn't work in Python 3.I thought about leaving the Python 2 version here with a disclaimer, though this list is already very long, and it seems more helpful to steer people toward a good solution than to exhaustively document an obsolete solution.
I simplified the Python 3 option to a version which seems equally safe without the context handler (it seems the file handle should be closed when it goes out of scope), which should be immediately upon return.