[pypy-commit] pypy py3.5: fix one translation error on win32, leave a hint about the next one
mattip
pypy.commits at gmail.com
Fri Mar 24 07:34:09 EDT 2017
Author: mattip <matti.picus at gmail.com>
Branch: py3.5
Changeset: r90800:04c4a170cbee
Date: 2017-03-24 14:33 +0300
http://bitbucket.org/pypy/pypy/changeset/04c4a170cbee/
Log: fix one translation error on win32, leave a hint about the next one
diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -577,6 +577,8 @@
def wrap_windowserror(space, e, w_filename=None):
XXX # WindowsError no longer exists in Py3.5
+ # instead, OSError has a kwarg winerror that overrides
+ # any errno supplied
from rpython.rlib import rwin32
winerror = e.winerror
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
@@ -855,9 +855,7 @@
# started through main() instead of wmain()
rwin32._wgetenv(u"")
for key, value in rwin32._wenviron_items():
- if isinstance(key, str):
- key = key.upper()
- space.setitem(w_env, space.newtext(key), space.newtext(value))
+ space.setitem(w_env, space.newunicode(key), space.newunicode(value))
@unwrap_spec(name=unicode, value=unicode)
def putenv(space, name, value):
More information about the pypy-commit
mailing list