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

Force environment variables to str with Python2 on Windows #101

Merged
merged 5 commits into from
Oct 31, 2018

Conversation

greyli
Copy link
Contributor

@greyli greyli commented Mar 8, 2018

With Python2 on Windows, force environment variables to str to avoid "TypeError: environment can only contain strings" in Python's subprocess.py.

Fix #88

With Python2 on Windows, force environment variables to str to avoid "TypeError: environment can only contain strings " in Python's subprocess.py.
@greyli greyli changed the title Force environment variables to str Force environment variables to str with Python2 on Windows Mar 8, 2018
@coveralls
Copy link

coveralls commented Mar 8, 2018

Coverage Status

Coverage decreased (-0.7%) to 84.274% when pulling d75a76a on greyli:patch-1 into 1a124ef on theskumar:master.

@theskumar theskumar force-pushed the master branch 2 times, most recently from d541b6c to fe35be1 Compare March 16, 2018 19:55
@greyli
Copy link
Contributor Author

greyli commented May 9, 2018

Any ideas? @theskumar

@greyli greyli closed this Jun 7, 2018
uranusjr added a commit to pypa/pipenv that referenced this pull request Jun 19, 2018
uranusjr added a commit to pypa/pipenv that referenced this pull request Jun 19, 2018
techalchemy pushed a commit to pypa/pipenv that referenced this pull request Jun 22, 2018
@SpotlightKid
Copy link

Why was this closed?

AFAICS, the proposed fix was not applied and the latest release 0.9.1 still has this problem.

This break Flask under Python 2.7 on Windows, beacause it uses python-dotenv automatically, if it is installed, when you use the Flask.run function to run a development server.

@greyli
Copy link
Contributor Author

greyli commented Oct 30, 2018

@SpotlightKid I finally create a PR in Werkzeug to fix this issue on master(#1320), maybe we should fix it in python-dotenv too. Ok, I just reopen it, but the maintainer seems very busy...

@greyli greyli reopened this Oct 30, 2018
@SpotlightKid
Copy link

Yes, this should be definitely fixed in python-dotenv, IMHO, since it can be used independently of any web framework.

@theskumar
Copy link
Owner

Thanks @greyli for taking this up! 👍 💟

@theskumar theskumar merged commit 43af2c5 into theskumar:master Oct 31, 2018
@greyli greyli deleted the patch-1 branch October 31, 2018 11:53
johnbergvall pushed a commit to johnbergvall/python-dotenv that referenced this pull request Aug 13, 2021
…#101)

* Force environment variables to str

With Python2 on Windows, force environment variables to str to avoid "TypeError: environment can only contain strings " in Python's subprocess.py.

* PEP8 fix

* Add Python3 compatible

* Fix flake8 fails with F821

* Fix flake8 fails with F821
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.

4 participants