[New-bugs-announce] [issue6790] httplib and array do not play together well

Jake McGuire report at bugs.python.org
Thu Aug 27 23:08:19 CEST 2009

New submission from Jake McGuire <jake at youtube.com>:

As of Python 2.6 you can no longer pass an array to 

Issue1065257 added code to httplib to attempt to determine whether a 
file-like object was passed to certain methods (e.g. send), and to 
stream the data if so.

The patch uses "hasattr(obj, 'read')" as a proxy for "is a file-like 

array.array objects have a method called "read" that is almost entirely 
disanalogous to the "read" method on a file-like object.

Hilarity ensues.

messages: 92015
nosy: jakemcguire
severity: normal
status: open
title: httplib and array do not play together well
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list