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

Update single-sourcing-package-version.rst #400

Merged
merged 2 commits into from Nov 21, 2017

Conversation

Projects
None yet
3 participants
@VDuda
Contributor

VDuda commented Nov 20, 2017

  • Bump example link to master from antiquated 1.5.6 tag (we should at least bump it to the latest tag)
  • Fix for read function to match with current state of pip example
Update single-sourcing-package-version.rst
* Bump example link to master from antiquated 1.5.6 tag (we should at least bump it to the latest tag)
* Fix for read function to match with current state of pip example
encoding=kwargs.get("encoding", "utf8")
) as fp:
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as fp:

This comment has been minimized.

@pradyunsg

pradyunsg Nov 20, 2017

Member

You'll want to include the line defining here. :)

This comment has been minimized.

@VDuda

VDuda Nov 20, 2017

Contributor

Good catch! Thanks!

Update single-sourcing-package-version.rst
Include/define `here` variable
@pradyunsg

This comment has been minimized.

Member

pradyunsg commented Nov 20, 2017

Thanks @VDuda!

This looks good to me as is. I am not sure if we want the guide to recommend using codecs.open. If we want to suggest that, there should also be an import codecs.

I'll wait for someone else. (it's not like I can merge this anyway)

@ncoghlan

We don't show any of the other imports (i.e. os.path), so I'm OK with leaving out the explicit codecs import in the example.

@ncoghlan ncoghlan merged commit cdc3614 into pypa:master Nov 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ncoghlan

This comment has been minimized.

Member

ncoghlan commented Nov 21, 2017

Thanks @VDuda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment