Issue 42 in twill: formfile not closing uploaded files

5 views
Skip to first unread message

codesite...@google.com

unread,
Apr 10, 2009, 12:06:52 PM4/10/09
to twill-...@googlegroups.com
Updates:
Labels: forms

Comment #1 on issue 42 by zerbie: formfile not closing uploaded files
http://code.google.com/p/twill/issues/detail?id=42

(No comment was entered for this change.)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Apr 11, 2009, 3:03:36 PM4/11/09
to twill-...@googlegroups.com
Updates:
Status: Accepted

Comment #2 on issue 42 by the.good.doctor.is.in: formfile not closing
uploaded files
http://code.google.com/p/twill/issues/detail?id=42

See ClientForm.py, class FileControl.

Possible solutions: document the problem (which is indeed that the fp is
stored until
the file control is garbage collected) and leave it at that;
run 'gc.collect' after
every form submit; use some sort of post-submit callback to close the fp;
or read the
entire file into memory and use a cStringIO to store it, which will solve
the file
handle problem by ballooning memory.

I like #2 or #3 (gc or post-submit callback). Comments?

codesite...@google.com

unread,
Apr 11, 2009, 3:47:17 PM4/11/09
to twill-...@googlegroups.com

Comment #3 on issue 42 by zerbie: formfile not closing uploaded files
http://code.google.com/p/twill/issues/detail?id=42

I vote for the post-submit callback. It seems cleanest, and does not
involve the
phrase "ballooning memory."

Reply all
Reply to author
Forward
0 new messages