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

Ensure environs are strings on Python 2 + Windows #2386

Merged
merged 2 commits into from
Jun 22, 2018

Conversation

uranusjr
Copy link
Member

# With Python2 on Windows, force environment variables to str to
# avoid "TypeError: environment can only contain strings" in
# Python's subprocess module.
if sys.version_info.major < 3 and sys.platform == 'win32':
Copy link
Member

Choose a reason for hiding this comment

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

we can use pipenv.utils.fs_str()

# system strings to avoid "TypeError: environment can only contain
# strings" in Python's subprocess module.
if sys.version_info.major < 3 and sys.platform == 'win32':
from pipenv.utils import fs_str
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason not to just do this all the time? Why not just always use fs_str here?

@techalchemy techalchemy force-pushed the python2-dotenv-subprocess-conflict branch from 1341b28 to 154f13a Compare June 22, 2018 07:11
@techalchemy techalchemy merged commit 82bf57a into master Jun 22, 2018
@techalchemy techalchemy deleted the python2-dotenv-subprocess-conflict branch June 26, 2018 05:06
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.

2 participants