[PyPy-issue] [issue611] StreamReader.decode does not accept `None` for the errors parameter

Jean-Paul Calderone pypy-dev-issue at codespeak.net
Mon Dec 20 06:31:06 CET 2010


New submission from Jean-Paul Calderone <exarkun at twistedmatrix.com>:

Came across this while trying out Cython on PyPy:

exarkun at boson:~$ python -c '                                     
from encodings import utf_8
from StringIO import StringIO
r = utf_8.StreamReader(StringIO("foo"))
print r.decode("bar", None)
'
(u'bar', 3)
exarkun at boson:~$ /tmp/pypy-c-jit-40134-42164a893f20-linux/bin/pypy -c '
from encodings import utf_8
from StringIO import StringIO
r = utf_8.StreamReader(StringIO("foo"))
print r.decode("bar", None)
'
Traceback (most recent call last):
  File "app_main.py", line 53, in run_toplevel
  File "app_main.py", line 486, in run_it
  File "<string>", line 5, in <module>
TypeError: expected string, got NoneType object
exarkun at boson:~$ 

This happens really early in Cython's compile process, preventing anything 
interesting from happening.

----------
effort: ???
messages: 2018
nosy: calderone, pypy-issue
priority: bug
release: 1.4
status: unread
title: StreamReader.decode does not accept `None` for the errors parameter

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue611>
_______________________________________________________



More information about the Pypy-issue mailing list