[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: @Victor Thanks for the comments - I don't understand why FieldStorage changes sys.stdout and sys.stderr (see remarks about IOMix above): please remove the charset argument (it is also confusing to have two encoding arguments). it

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20387/cgi_32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Etienne Robillard
Etienne Robillard e...@gthcfoundation.org added the comment: +1 thanks for this input. I agree for the most part. However if the io semantics in python 3 is radically different than on python 2, I could have expected that WSGI scripts would similarly depend on a newer type of file descriptor

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Pierre, Thank you for the new patch, with the philosophy of it's broke, so let's produce something the committers like to get it fixed. I see you overlooked removing the second use of O_BINARY. Locally, I removed that also, and tested

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Glenn, you read my mind ;-) Thanks for mentioning the O_BINARY thing. New (last !) patch attached -- Added file: http://bugs.python.org/file20403/cgi_32.patch ___ Python tracker

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20402/cgi_32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r87996+r87997 adds encoding and errors argument to parse_qs() and parse_qsl() of urllib.parse. It is needed to decoded correctly %XX syntax in cgi. r87998 is the patch on the cgi module. Changes with cgi_32.patch: * Use

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I forgot to credit the author(s): who wrote the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Thanks a lot Victor ! I wrote the patch : Pierre Quentel (pierre.quen...@gmail.com) with many inputs by Glenn Linderman 2011/1/14 STINNER Victor rep...@bugs.python.org STINNER Victor victor.stin...@haypocalc.com added the comment:

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: TODO: Add more tests to test_cgi. What is the latest patch for test_cgi? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20405/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: My latest patch for test_cgi is in cgi_32.patch I will try to add more tests later -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: haypo What is the latest patch for test_cgi? quentel My latest patch for test_cgi is in cgi_32.patch Ok, but cgi_32.patch doesn't add any test. I only adapt existing tests for your other changes. I remove cgi_32.patch because it

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20403/cgi_32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Remove cgi_plus_tests.diff: it looks to be an old version of cgi_32.patch. @r.david.murray: Did you write cgi_plus_tests.diff, or is it based on the work on Pierre Quentel? -- ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file20269/cgi_plus_tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file12750/tmpav1vve.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file12751/tmpy44zj7.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Remove tmpy44zj7.html and tmpav1vve.html: a similar file is included in full_source_and_error.zip. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: -pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___ ___ Python-bugs-list mailing

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Victor: we normally leave the patch file that was committed attached to the issue for future reference. The _plus_tests file was just the original patch plus the existing cgi tests adjusted to pass in bytes instead of strings to cgi, if

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Glenn Linderman
Changes by Glenn Linderman v+pyt...@g.nevcal.com: -- versions: +Python 3.2 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___ ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Thanks to Pierre for producing patch after patch and testing testing testing, and to Victor for committing it, as well as others that contributed in smaller ways, as I tried to. I look forward to 3.2 rc1 so I can discard all my

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Because I'm unable to read the whole history and analyze each file attached to this issue, I opened #10911 to ask to write more tests for the cgi module. -- ___ Python tracker

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le vendredi 14 janvier 2011 à 19:11 +, R. David Murray a écrit : Victor: we normally leave the patch file that was committed attached to the issue for future reference. Sorry, but there were too much files. I was trying to

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Small tip: To ease review, I recommend you work from a checkout of the Subversion py3k branch, using svn add if you have new files and then producing one svn diff of the whole checkout. It’s easier than looking at multiple files, even more so if

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20229/cgi_diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20235/cgi_diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20322/cgi_diff_20110109.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20323/cgi_tests.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20356/cgi_diff_20110111.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20382/cgi_diff_20110112.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20383/cgi_20110113.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20384/test_cgi_20111013.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Changes by Pierre Quentel pierre.quen...@gmail.com: Removed file: http://bugs.python.org/file20244/cgi_diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Ok Eric, thanks for the tips I attach the diff for the 2 modified modules (cgi.py and test_cgi.py). For the other tests, they are not in the branch and there are many test files so I leave the zip file I removed outdated diffs

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It getting in to 3.2 would be a release manager call, so I've set it to release blocker so Georg can make the call. My opinion is that while I would *really* like to see this fixed in 3.2, the changes really should have a thorough

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Ok, thanks. Here is a summary of the API changes : - the argument fp passed to FieldStorage is either an instance of (a subclass of) io.TextIOBase with a buffer attribute for the underlying binary layer (thus, it can't be a StringIO

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Andy Harrington ahar...@luc.edu added the comment: I found a similar issue. If you want more simple files demonstrating the issue, I have attached some. If I start my localCGIServer.py, then I can use adder.html fine (uses get), but with adderpost.html (uses post) the cgi action file,

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Changes by Andy Harrington ahar...@luc.edu: Removed file: http://bugs.python.org/file20392/localCGIServer.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Changes by Andy Harrington ahar...@luc.edu: Added file: http://bugs.python.org/file20393/adder.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Changes by Andy Harrington ahar...@luc.edu: Added file: http://bugs.python.org/file20394/adderpost.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: -pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___ ___ Python-bugs-list mailing

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Changes by Andy Harrington ahar...@luc.edu: Added file: http://bugs.python.org/file20395/localCGIServer.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Andy Harrington
Changes by Andy Harrington ahar...@luc.edu: Added file: http://bugs.python.org/file20396/adder.cgi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, there are 10+ files attached, 20+ comments, no up-to-date patch. It's really too late for 3.2 IMO. -- nosy: +pitrou priority: release blocker - normal stage: patch review - needs patch versions: -Python 3.2

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Pierre Quentel
Pierre Quentel pierre.quen...@gmail.com added the comment: Comment ça, no up to date patch ? cgi_32.patch is up to date, the API changes are documented, the unittests work, what else do you want ? -- ___ Python tracker rep...@bugs.python.org

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Comment ça, no up to date patch ? cgi_32.patch is up to date, the API changes are documented, the unittests work, what else do you want ? The O_BINARY stuff looks obsolete to me. -- ___ Python

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: The O_BINARY stuff was probably necessary because issue 10841 is not yet in the build Pierre was using? I agree it in not necessary with the fix for that issue, but neither does it hurt. It could be stripped out, if you think that is

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Can one person please 1) Sum up the discussion and its outcome briefly 2) Remove all patches and replace them with one diff with docs, tests and code (even if you have new files, you don’t have to put them in a zip, use svn add and they will

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file20288/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4953 ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Etienne Robillard
Etienne Robillard e...@gthcfoundation.org added the comment: +1 -- title: cgi module cannot handle POST with multipart/form-data in 3.x - cgi module cannot handle POST with multipart/form-data in 3.x ___ Python tracker rep...@bugs.python.org

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tested cgi_32.patch on Windows with Apache: - a test with a binary file works: I get a binary file instead of a text file - a test with a non-ASCII character (a\xe9b) works: the text is correctly decoded I used the test script

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Victor, thanks for your comments, and interest in this bug. Other than the existence of the charset parameter, and whether or not to include IOMix, I think all of the others could be fixed later, and do not hurt at present. So I will

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: FWIW, keep in mind that cgi.FieldStorage is also quite often used in WSGI scripts in arbitrary WSGI servers which have got nothing to do with CGI. Having cgi.FieldStorage muck around with stdout/stderr under WSGI, even where using

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.x

2011-01-13 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: Graham, Thanks for your comments. Fortunately, if the new charset parameter is not supplied, no mucking with stdout or stderr is done, which is the only reason I cannot argue strongly against the feature, which I would have implemented