-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure Monkeypatch setenv and delenv keep bytes keys in Python 2
Fixes the bug described in: tox-dev/tox#1025 (comment) Which is more evident when using `unicode_literals`.
- Loading branch information
1 parent
b1fbb2a
commit a664fb2
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Ensure ``MonkeyPatch.setenv`` and ``MonkeyPatch.delenv`` use native strings for environment variable names. | ||
|
||
In Python 2, adding ``unicode`` keys to ``os.environ`` causes problems with ``subprocess`` (and possible other modules), | ||
making this a subtle bug specially susceptible when used with ``from __future__ import unicode_literals``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters