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

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

Merged
merged 2 commits into from Nov 21, 2017
Merged

Conversation

VDuda
Copy link
Contributor

@VDuda 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

* 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:
Copy link
Member

@pradyunsg pradyunsg Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

@VDuda VDuda Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks!

Include/define `here` variable
@pradyunsg
Copy link
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)

Copy link
Member

@ncoghlan ncoghlan left a comment

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
@ncoghlan
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants