[issue3834] wsgiref.validator.InputWrapper readline method has wrong signature

2008-09-11 Thread Phillip J. Eby

Phillip J. Eby <[EMAIL PROTECTED]> added the comment:

Per PEP 333:

"""The optional "size" argument to readline() is not supported, as it
may be complex for server authors to implement, and is not often used in
practice."""

The whole point of this code is to catch broken programs that pass an
argument to readline() -- they are not WSGI-compliant.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3834] wsgiref.validator.InputWrapper readline method has wrong signature

2008-09-11 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
assignee:  -> pje
nosy: +pje

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3834] wsgiref.validator.InputWrapper readline method has wrong signature

2008-09-11 Thread Christopher Arndt

New submission from Christopher Arndt <[EMAIL PROTECTED]>:

The readline method in the InputWrapper class in wsgiref.validate does
not  accept any arguments and therefore is not compatible with the
"file-like" interface, where the readline method accepts an optional
"size" argument. 

This breaks code that wraps file objects with their own wrapper class
and tries to call the readline method of the wrapped object with a
"size" argument.

Current code::

def readline(self):
v = self.input.readline()
assert_(type(v) is type(""))
return v


Should be::

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

--
components: Library (Lib)
messages: 73016
nosy: strogon14
severity: normal
status: open
title: wsgiref.validator.InputWrapper readline method has wrong signature
versions: Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com