Skip to content
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

SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option #605

Merged
merged 3 commits into from
Mar 30, 2019
Merged

Conversation

paulmelnikow
Copy link
Contributor

@paulmelnikow paulmelnikow commented Mar 28, 2019

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.

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.
@paulmelnikow paulmelnikow changed the title SIngle-sourcing the package version: Remove a py2-only option SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option Mar 28, 2019
Co-Authored-By: paulmelnikow <github@paulmelnikow.com>
@theacodes theacodes merged commit 9683e8d into pypa:master Mar 30, 2019
@theacodes
Copy link
Member

Thanks, @paulmelnikow!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants