[ZCM] [ZC] 1199/ 4 Assign "FileUpload not iterable"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri May 28 16:42:36 EDT 2004


Issue #1199 Update (Assign) "FileUpload not iterable"
 Status Accepted, Zope/bug+solution medium
To followup, visit:
  http://zope.org/Collectors/Zope/1199

==============================================================
= Assign - Entry #4 by LRA on May 28, 2004 4:42 pm

 Status: Pending => Accepted

 Supporters added: LRA


________________________________________
= Comment - Entry #3 by LRA on Apr 29, 2004 6:51 pm


Uploaded:  "bug-1199-wo-braindamage.diff"
 - http://zope.org/Collectors/Zope/1199/bug-1199-wo-braindamage.diff/view
previous patch had a hard to spot braindamage (missing comma between two strings. Even Python didn't complain because it's a valid string syntax)

________________________________________
= Comment - Entry #2 by LRA on Apr 29, 2004 5:16 pm


Uploaded:  "bug-1199.diff"
 - http://zope.org/Collectors/Zope/1199/bug-1199.diff/view
here's a patch based on discussions at 2004-04-29 bugday

________________________________________
= Request - Entry #1 by LRA on Jan 20, 2004 11:57 pm

ZPublisher.HTTPRequest.FileUpload class does not implement the iterable interface regular files do, so it can't be used in places where a file object is assumed to be an iterable, like csv.reader(), for instance.

I think fixing this is as easy as implementing an __iter__ method that returns 'self' and a .next() method as an alias for .readline() in the FileUpload class
==============================================================




More information about the Zope-Collector-Monitor mailing list