X Tutup
Skip to content

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

Merged
theacodes merged 3 commits intopypa:masterfrom
paulmelnikow:patch-2
Mar 30, 2019
Merged

SIngle-sourcing the package version: Remove a py2-only option; simplify a py3 option#605
theacodes merged 3 commits intopypa:masterfrom
paulmelnikow:patch-2

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.

4 participants

X Tutup