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

@uranusjr uranusjr commented Jun 19, 2018

# 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':

This comment has been minimized.

@techalchemy

techalchemy Jun 19, 2018
Member

we can use pipenv.utils.fs_str()

@uranusjr uranusjr force-pushed the python2-dotenv-subprocess-conflict branch from 8f1313c to 1341b28 Jun 19, 2018
# 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

This comment has been minimized.

@techalchemy

techalchemy Jun 22, 2018
Member

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

uranusjr and others added 2 commits Jun 19, 2018
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy force-pushed the python2-dotenv-subprocess-conflict branch from 1341b28 to 154f13a Jun 22, 2018
@techalchemy techalchemy merged commit 82bf57a into master Jun 22, 2018
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build cancelled
Details
buildkite/pipenv Build #488 passed (6 minutes, 7 seconds)
Details
@techalchemy techalchemy deleted the python2-dotenv-subprocess-conflict branch Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.