[issue3442] wsgiref.validate.InputWrapper.readline does not accept optional "length" argument

Pavel Strashkin report at bugs.python.org
Fri Jul 25 13:38:07 CEST 2008


New submission from Pavel Strashkin <xaka2004 at gmail.com>:

All file/stream-like objects in Python have "readline" method with
optional "length" argument, but wsgiref.validate.InputWrapper doest not
have. Some 3rd party modules/packages use this argument. As result there
is exception:
<type 'exceptions.TypeError'>: readline() takes exactly 1 argument (2 given)

I think wsgiref.validate.InputWrapper.readline must be implemented same
to wsgiref.validate.InputWrapper.read:

def readline(self, *args, **kwargs):
    v = self.input.readline(*args, **kwargs)
    assert_(type(v) is type(""))
    return v

----------
components: Library (Lib)
messages: 70248
nosy: xaka
severity: normal
status: open
title: wsgiref.validate.InputWrapper.readline does not accept optional "length" argument
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3442>
_______________________________________


More information about the Python-bugs-list mailing list