Author erob
Recipients amaury.forgeotdarc, barry, eric.araujo, erob, flox, ggenellina, giampaolo.rodola, gvanrossum, oopos, pebbe, quentel, r.david.murray, tcourbon, tercero12, tobias, v+python
Date 2011-01-03.15:33:06
SpamBayes Score 2.81491e-12
Marked as misclassified No
Message-id <4D21EEE5.6040807@gthcfoundation.org>
In-reply-to <1294065916.43.0.119829486085.issue4953@psf.upfronthosting.co.za>
Content
On 03/01/11 09:45 AM, R. David Murray wrote:
> R. David Murray <rdmurray@bitdance.com> added the comment:
>
> Etienne: since this is about solving a 3.x specific problem, it will not get backported.  Issue 1573931 looks unrelated to me at a quick glance.  FYI, you will find that you *do* have detach in 2.7 if you open a file using the io subsystem (import io).  Of course, that isn't used for the std files in 2.7.
>
> Glen: the new IO subsystem is a complete C layer on top of only the most basic of the C runtime stuff.  It does handle cross platform issues.  Given that, and given that the input to CGI *should* be bytes, I think letting an error raise if the stream is text and detatch isn't available is fine, though we might find we want to catch it to improve the error message with extra context.
>
> Pierre: yes, that diff is what I was looking for.  I hope to have time to look it over later today.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4953>
> _______________________________________
>   

Thanks for theses precisions, David.

So will cgi.FieldStorage still be usable in 3.x using 2.5 semantics ?
implementing the size argument
in the FieldStorage class would surely be a good fix for WSGI middlewares. 

Either ways (using the new io subsystem) or monkey-patching
cgi.FieldStorage so it accepts the size argument could probably helps to
resolve memory-usage issues with things like file uploads!

Regards
History
Date User Action Args
2011-01-03 15:33:22erobsetrecipients: + erob, gvanrossum, barry, amaury.forgeotdarc, ggenellina, giampaolo.rodola, eric.araujo, v+python, r.david.murray, oopos, tercero12, tcourbon, tobias, flox, pebbe, quentel
2011-01-03 15:33:07eroblinkissue4953 messages
2011-01-03 15:33:06erobcreate