Skip to content

Make sure we pass unicode, not bytes to CreateProcess()#830

Merged
rodrigc merged 9 commits into
trunkfrom
9200-rodrigc-spawnprocess-py3-2
Jul 5, 2017
Merged

Make sure we pass unicode, not bytes to CreateProcess()#830
rodrigc merged 9 commits into
trunkfrom
9200-rodrigc-spawnprocess-py3-2

Conversation

@rodrigc

@rodrigc rodrigc commented Jun 30, 2017

Copy link
Copy Markdown
Contributor

@opalmer opalmer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good 👍

On Windows file system paths are Unicode by default so it's a bit redundant to do .decode(sys.getfilesystemencoding()). The docs for Python 2 mention that getfilesystemencoding() is mainly intended for string -> byte conversion and for Python 3 it apparently changes to always be 'utf-8'. But based on the docs it shouldn't hurt either so I'd leave it as you have it in case there are edge cases out there.

References:
https://docs.python.org/2/library/sys.html#sys.getfilesystemencoding
https://docs.python.org/3/library/sys.html#sys.getfilesystemencoding
https://www.python.org/dev/peps/pep-0529/
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx

@rodrigc

rodrigc commented Jun 30, 2017

Copy link
Copy Markdown
Contributor Author

@altendky Thanks for #831 , it boosted the coverage of my PR from 95% to 100%

@glyph

glyph commented Jul 1, 2017

Copy link
Copy Markdown
Member

Thank you @altendky !

@opalmer opalmer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, forgot to hit approve on my side.

@glyph

glyph commented Jul 1, 2017

Copy link
Copy Markdown
Member

What happened to break it again :-( it looks like 95% now.

@rodrigc rodrigc closed this Jul 2, 2017
@rodrigc rodrigc reopened this Jul 2, 2017
@rodrigc

rodrigc commented Jul 3, 2017

Copy link
Copy Markdown
Contributor Author

@twisted twisted deleted a comment from codecov Bot Jul 5, 2017
@rodrigc rodrigc closed this Jul 5, 2017
@rodrigc rodrigc reopened this Jul 5, 2017
@rodrigc

rodrigc commented Jul 5, 2017

Copy link
Copy Markdown
Contributor Author

@rodrigc
rodrigc merged commit 89c53f8 into trunk Jul 5, 2017
@rodrigc
rodrigc deleted the 9200-rodrigc-spawnprocess-py3-2 branch July 5, 2017 21:28
@glyph

glyph commented Jul 6, 2017

Copy link
Copy Markdown
Member

Thanks for investigating @rodrigc.

Hey @codecov - any idea why we keep getting PRs like this where the comment and the build status don't get updated?

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.

3 participants