[pypy-commit] pypy py3.5-newtext: fixes
arigo
pypy.commits at gmail.com
Wed Feb 15 10:41:58 EST 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5-newtext
Changeset: r90155:9bf4d7af2fe4
Date: 2017-02-15 16:41 +0100
http://bitbucket.org/pypy/pypy/changeset/9bf4d7af2fe4/
Log: fixes
diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -1066,7 +1066,8 @@
if w_def is Ellipsis:
if isinstance(defaultval, str) and (
# XXX hackish
- spec == 'bytes' or isinstance(spec, WrappedDefault)):
+ spec == 'bytes' or spec == 'bufferstr'
+ or isinstance(spec, WrappedDefault)):
w_def = space.newbytes(defaultval)
else:
w_def = space.wrap(defaultval)
diff --git a/pypy/interpreter/test/test_error.py b/pypy/interpreter/test/test_error.py
--- a/pypy/interpreter/test/test_error.py
+++ b/pypy/interpreter/test/test_error.py
@@ -120,7 +120,7 @@
w_EnvironmentError = [EnvironmentError]
def wrap(self, obj):
return [obj]
- newint = newtext = wrap
+ newint = newtext = newunicode = wrap_fsdecoded = wrap
def call_function(self, exc, w_errno, w_msg, w_filename=None):
return (exc, w_errno, w_msg, w_filename)
space = FakeSpace()
More information about the pypy-commit
mailing list