[pypy-commit] pypy py3k: posix.environ is a dict of bytes, os.environ decode these with the fsencoding.
amauryfa
noreply at buildbot.pypy.org
Fri Oct 14 02:16:45 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48045:d59c68a96b3b
Date: 2011-10-14 02:04 +0200
http://bitbucket.org/pypy/pypy/changeset/d59c68a96b3b/
Log: posix.environ is a dict of bytes, os.environ decode these with the
fsencoding.
diff --git a/pypy/module/posix/interp_posix.py b/pypy/module/posix/interp_posix.py
--- a/pypy/module/posix/interp_posix.py
+++ b/pypy/module/posix/interp_posix.py
@@ -510,7 +510,7 @@
def _convertenviron(space, w_env):
space.call_method(w_env, 'clear')
for key, value in os.environ.items():
- space.setitem(w_env, space.wrap(key), space.wrap(value))
+ space.setitem(w_env, space.wrapbytes(key), space.wrapbytes(value))
@unwrap_spec(name=str, value=str)
def putenv(space, name, value):
More information about the pypy-commit
mailing list