[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-01-04 Thread STINNER Victor
New submission from STINNER Victor : Steps 1 and 3 of PyUnicode_FromFormatV() doesn't handle the format string "%%" correctly. The loop responsible to skip the precision moves outside the format string, and the function will then read uninitialized memory. The loop: while (*++f &&

[issue8052] subprocess close_fds behavior should only close open fds

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: According to POSIX [1], if a multi-threaded program calls fork(), the child process may only use async-signal-safe system calls between fork() and exec*(). readdir() is not required to be async-safe [2], so reading /proc/self/fds in the child process is undefin

[issue8052] subprocess close_fds behavior should only close open fds

2011-01-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Of course, procfs isn't standard in any case; would it be necessary to > have a fallback for systems without it? Or do all *nix systems that we > care about provide it? /proc/self doesn't exist under OpenSolaris. You have to use /proc/. And I suppose there ca

[issue9566] Compilation warnings under x64 Windows

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: pyexpat.patch: new try, does it look better? -- keywords: +patch Added file: http://bugs.python.org/file20263/pyexpat.patch ___ Python tracker _

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread Nadeem Vawda
Nadeem Vawda added the comment: r87736 introduces another DeprecationError; this time in test_time (line 150; s/assertEquals/assertEqual/). -- ___ Python tracker ___ __

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Oh, my first patch was wrong: it failed on %c format (in zipimport with "%U%c%U"). The second version of the patch should be better. -- Added file: http://bugs.python.org/file20264/pyunicode_fromformatv-2.patch ___

[issue10830] PyUnicode_FromFormatV("%c") doesn't support non-BMP characters on narrow build

2011-01-04 Thread STINNER Victor
New submission from STINNER Victor : PyUnicode_FromFormatV("%c") supposes that an unicode character is always stored as a single Py_UNICODE word: but that's wrong on narrow build with characters in [U+1; U+10]. Attached patch fixes this bug. See also #10829. -- components: In

[issue10790] Header.append's charset logic is bogus, 'shift_jis' and "euc_jp' don't work as charsets

2011-01-04 Thread R. David Murray
R. David Murray added the comment: Committed to py3k in r87750 and 3.1 in r87751. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue10831] PyUnicode_FromFormatV() doesn't support %li, %lli, %zi

2011-01-04 Thread STINNER Victor
New submission from STINNER Victor : PyUnicode_FromFormatV() supports %d, %ld, %lld, %zd, %u, %lu, %llu, %zu, %i. But it doesn't support %li, %lli, %zi. Attached patch implements the 3 missing formats, and add unit tests for all these formats. -- components: Interpreter Core, Unicode

[issue10831] PyUnicode_FromFormatV() doesn't support %li, %lli, %zi

2011-01-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: PyBytes_FromFormatV() has the same issue. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10832] Add support of bytes objects in PyBytes_FromFormatV()

2011-01-04 Thread STINNER Victor
New submission from STINNER Victor : It would be very practical use have a format, eg. '%y', to accept bytes object in PyBytes_FromFormatV(). Example (extracted from posixmodule.c): k = PyBytes_AsString(key2); v = PyBytes_AsString(val2); len = PyBytes_GET_SIZE(key2) + P

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-01-04 Thread STINNER Victor
New submission from STINNER Victor : Guido created the "convenience function" PyErr_Format() 13 years ago (r7580) with a naive implementation using char buffer[500] and vsprintf(). He added a comment: /* Caller is responsible for limiting the format */ Ok, that was true 13 years ago. But toda

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: use_format.patch is a patch to avoid PyOS_snprintf() with a fixed buffer: use directly PyUnicode_FromFormat(), PyErr_Format() or PySys_FormatStderr() instead. This patch is just a draft, it should be tested :-) There are other calls to PyOS_snprintf() that ca

[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-01-04 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20262/pyunicode_fromformatv.patch ___ Python tracker ___ ___ Python-bugs-

[issue10832] Add support of bytes objects in PyBytes_FromFormatV()

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Patch implementing this feature. It only supports bytes. -- keywords: +patch Added file: http://bugs.python.org/file20268/pybytes_fromformat_y.patch ___ Python tracker ___

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-04 Thread R. David Murray
R. David Murray added the comment: A day late, but I've looked at the patch. Now, I'm not all that knowledgeable about CGI, so other people will probably want to chime in here First, I'm uploading a new version of the patch as an svn diff (can be applied to a checkout using 'patch -p0 Fr

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-04 Thread R. David Murray
R. David Murray added the comment: Here is a modified version of the unittest file from unittest.zip that can be run against Pierre's code (it feeds FieldStorage a text stream with a buffer). Running the tests require the data files from the zip. They do not pass, in a very different way fro

[issue10833] Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500 bytes is outdated

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Woops, I didn't want to do it, but I already commited the simple part of this issue (U format, eg. %.100U): r87753. -- ___ Python tracker ___

[issue10756] Error in atexit._run_exitfuncs [...] Exception expected for value, str found

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Commited as r87755+r87758. Wait for the buildbot before backporting to other versions. -- nosy: +haypo ___ Python tracker ___

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: > r87710 introduces a ResourceWarning in test_threading. Fix attached. Fixed by r87757 (I wrote a different patch). -- ___ Python tracker ___

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: > r87736 introduces another DeprecationError; this time in test_time (line 150; > s/assertEquals/assertEqual/). Fixed by r87759. -- ___ Python tracker __

[issue10828] Cannot use nonascii utf8 in names of files imported from

2011-01-04 Thread ingemar
ingemar added the comment: Have I tried 3.2b2? No. I will have to wait for 3.2, or more exactly for a Windows installer for PyQt for 3.2 to become available. Compiling that on Windows is beyond my resources and experience. I will make a point to tell you then. --

[issue10785] parser: store the filename as an unicode object

2011-01-04 Thread STINNER Victor
STINNER Victor added the comment: Version 3 of the patch to fix also #9319. -- Added file: http://bugs.python.org/file20271/parser_filename_obj-3.patch ___ Python tracker ___ __

[issue10785] parser: store the filename as an unicode object

2011-01-04 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20180/parser_filename_obj.patch ___ Python tracker ___ ___ Python-bugs-li

[issue10785] parser: store the filename as an unicode object

2011-01-04 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20184/parser_filename_obj-2.patch ___ Python tracker ___ ___ Python-bugs-

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2011-01-04 Thread Glenn Linderman
Glenn Linderman added the comment: R. David said: >From looking over the cgi code it is not clear to me whether Pierre's approach >is simpler or more complex than the alternative approach of starting with >binary input and decoding as appropriate. From a consistency perspective I >would pref

[issue10818] pydoc: Remove old server and tk panel

2011-01-04 Thread Ron Adam
Ron Adam added the comment: Here is a patch for this. Not much to it as the hard parts were already done. Apparently there was no tests for this, test_pydoc still passes without it. Does there need to be any messages for the -g option? Pydoc help is displayed in the case -g is used. That a

[issue2193] Cookie Colon Name Bug

2011-01-04 Thread karl
karl added the comment: The rules for parsing and setting the cookies are different. Server should always produce strict cookies only. So the production rules are to be done accordingly to the specification. Adam Barth is working right now on an update of the "HTTP State Management Mechanis

[issue2193] Cookie Colon Name Bug

2011-01-04 Thread karl
karl added the comment: Ah the server is back the rules for the User Agents are defined here http://tools.ietf.org/html/draft-ietf-httpstate-cookie#section-5 -- ___ Python tracker _

[issue10812] Add some posix functions

2011-01-04 Thread Ross Lagerwall
Ross Lagerwall added the comment: This patch: Fixes test_lutimes(), Ignores a posix_fallocate() failure on Solaris due to ZFS, Changes readv() & writev() signatures such that they take sequences instead of tuples, Changes readv() so that it takes a number of writable buffers, fills them and r

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-04 Thread Lenard Lindstrom
Changes by Lenard Lindstrom : -- nosy: +kermode ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

<    1   2