[issue10408] Denser dicts and linear probing

2011-08-24 Thread John O'Connor
Changes by John O'Connor tehj...@gmail.com: -- nosy: +jcon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10408 ___ ___ Python-bugs-list mailing

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-24 Thread Glenn Linderman
Glenn Linderman v+pyt...@g.nevcal.com added the comment: In msg142098 Ezio said: Keep in mind that we should be able to access and use lone surrogates too, therefore: s = '\ud800' # should be valid len(s) # should this raise an error? (or return 0.5 ;)? I say: For streams and data types

[issue6584] gzip module has no custom exception

2011-08-24 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584 ___ ___ Python-bugs-list

[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2011-08-24 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6669 ___ ___ Python-bugs-list

[issue12388] cannot specify recursive extra_files in packaging setup.cfg

2011-08-24 Thread trevor
Changes by trevor tre...@well.com: -- nosy: +trevor ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12388 ___ ___ Python-bugs-list mailing list

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-08-24 Thread trevor
Changes by trevor tre...@well.com: -- nosy: +trevor ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12386 ___ ___ Python-bugs-list mailing list

[issue12830] --install-data doesn't effect resources destination

2011-08-24 Thread trevor
New submission from trevor tre...@well.com: attempting to point the relative destination with --install-data does not seem to have an effect. the specified directory is created, but resources are still installed relative to the present working directory. setup.cfg: [files] resources =

[issue12831] 2to3 and integer division

2011-08-24 Thread Alexander Rødseth
New submission from Alexander Rødseth rods...@gmail.com: Hi, 2to3 is a great tool, but I think I found one case it doesn't catch, which is this change: -half = self.maxstars / 2 +half = self.maxstars // 2 / 2 is an integer division, so it should be // 3 in Python 3. Thanks.

[issue1666318] shutil.copytree doesn't give control over directory permissions

2011-08-24 Thread Ugra Dániel
Changes by Ugra Dániel daniel.u...@gmail.com: -- nosy: +daniel.ugra ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1666318 ___ ___ Python-bugs-list

[issue12832] The documentation for the print function should explain/point to how to control the sys.stdout encoding

2011-08-24 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: A common problem encountered when using python3 is writing non-ascii to stdout. This will work fine if stdout is a terminal and the terminal encoding handles the characters, but will fail if stdout is later redirected to a pipe. The

[issue12832] The documentation for the print function should explain/point to how to control the sys.stdout encoding

2011-08-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Victor says it defaults to LOCALE in 3.3. The documentation should still be expanded to mention this even in 3.3, though. -- ___ Python tracker rep...@bugs.python.org

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: +if (len == 0) { +if (PyByteArray_CheckExact(self)) { +Py_INCREF(self); +return (PyObject *)self; +} +return PyByteArray_FromStringAndSize(NULL, 0); +} This looks like a dubious

[issue12832] The documentation for the print function should explain/point to how to control the sys.stdout encoding

2011-08-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ah, this was actually fixed in 3.2, so it is only 2.7 where there is the different (and long standing) problem of output of unicode to a pipe. So, the doc issue boils down to mentioning how the encoding for stdout/stderr is derived

[issue12803] SSLContext.load_cert_chain() should accept a password argument

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the patch. This is a generally useful functionality and the patch looks mostly good. I have a couple comments: - in _pwinfo_set(), you need to decref password_bytes when you're finished - you check the password size in

[issue3244] multipart/form-data encoding

2011-08-24 Thread Conley Owens
Changes by Conley Owens xcc...@gmail.com: -- nosy: +cco3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3244 ___ ___ Python-bugs-list mailing list

[issue6560] socket sendmsg(), recvmsg() methods

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch skipping testFDPassSeparate and testFDPassSeparateMinSpace on OS X 10.5, due to known kernel bugs (see http://developer.apple.com/library/mac/#qa/qa1541/_index.html). For InterruptedSendTimeoutTest and

[issue12333] test_packaging failures under Solaris

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: More occurrences: http://www.python.org/dev/buildbot/all/builders/sparc solaris10 gcc 3.x/builds/3555/steps/test/logs/stdio == ERROR: test_record_extensions

[issue12833] raw_input misbehaves when readline is imported

2011-08-24 Thread Idan Kamara
New submission from Idan Kamara idank...@gmail.com: import sys, readline sys.stdout.write('foo ') raw_input() When trying the above on Debian, 2.6.6 using gnome-terminal, typing a character then hitting backspace deletes foo as well. I'm not sure if this is a bug or the expected behavior

[issue12824] Make the write_file() helper function in test_shutil return the file name it wrote to

2011-08-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: ok. it would have saved some LOC for me, but it's nothing essential of course. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12824

[issue12830] --install-data doesn't effect resources destination

2011-08-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: This is one of the things that were left under-specified when the resources subsystem was introduced by adding working code instead of a PEP. I think that --install-data is obsolete now, and that there should be another way to override

[issue12715] Add symlink support to shutil functions

2011-08-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: What started as a 2 lines fix, grew to a patch of ~400 lines. :) It's mostly tests though: Lib/shutil.py | 102 +-- Lib/test/test_shutil.py | 220

[issue12715] Add symlink support to shutil functions

2011-08-24 Thread Hynek Schlawack
Changes by Hynek Schlawack h...@ox.cx: -- keywords: +patch Added file: http://bugs.python.org/file23028/e126ceae5ba9.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12715 ___

[issue12810] Remove check for negative unsigned value in socketmodule.c

2011-08-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4736e172fa61 by Charles-François Natali in branch 'default': Issue12810: Remove check for negative unsigned value in socketmodule.c. Patch http://hg.python.org/cpython/rev/4736e172fa61 -- nosy: +python-dev

[issue12810] Remove check for negative unsigned value in socketmodule.c

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Patch committed. Thanks Joel! -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12715] Add symlink support to shutil functions

2011-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo, neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12715 ___ ___ Python-bugs-list

[issue12803] SSLContext.load_cert_chain() should accept a password argument

2011-08-24 Thread Adam Simpkins
Adam Simpkins a...@adamsimpkins.net added the comment: Good catch. Here's an updated patch to fix the missing decref in _pwinfo_set() The length check in _password_callback() applies to both callback functions and predefined strings. The C API always uses a callback, so _password_callback()

[issue12834] memoryview.tobytes() incorrect for non-contiguous arrays

2011-08-24 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: memoryview.tobytes() converts a non-contiguous array to a contiguous representation. This result is not right: from numpy import * x = array([1,2,3,4,5], dtype=B) y = x[::-1] y array([5, 4, 3, 2, 1], dtype=uint8) m =

[issue12834] memoryview.tobytes() incorrect for non-contiguous arrays

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That's rather funky. What should the right result be? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834 ___

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I can't seem to reproduce this under 3.3. Should it be closed? -- nosy: +pitrou resolution: - out of date versions: +Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org

[issue6560] socket sendmsg(), recvmsg() methods

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: As noted by Antoine, the OS X 10.5 buildbots are also failing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560 ___

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: On Wed, Aug 24, 2011 at 3:01 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: I can't seem to reproduce this under 3.3. Should it be closed? I don't think so; it's still applicable to 2.x, and

[issue12834] memoryview.tobytes() incorrect for non-contiguous arrays

2011-08-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Antoine Pitrou rep...@bugs.python.org wrote: That's rather funky. What should the right result be? Basically [5, 4, 3, 2, 1] as bytes: '\x05\x04\x03\x02\x01' Looks like an off-by-one error. I was a bit surprised that tobytes()

[issue12835] Missing SSLSocket.sendmsg() wrapper allows programs to send unencrypted data by mistake

2011-08-24 Thread David Watson
New submission from David Watson bai...@users.sourceforge.net: Changeset fd10d042b41d removed the wrappers on ssl.SSLSocket for the new socket.send/recvmsg() methods (since I forgot to check for the existence of the underlying methods - see issue #6560), but this leaves SSLSocket with

[issue6560] socket sendmsg(), recvmsg() methods

2011-08-24 Thread David Watson
David Watson bai...@users.sourceforge.net added the comment: On Tue 23 Aug 2011, Nick Coghlan wrote: As you can see, I just pushed a change that removed the new methods from SSLSocket objects. If anyone wants to step up with a valid use case (not already covered by wrap_socket), preferably

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +pitrou, rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12786 ___ ___

[issue12834] memoryview.tobytes() incorrect for non-contiguous arrays

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12834 ___ ___

[issue12760] Add create mode to open()

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: So, what was the conclusion of the discussion brought up on python-dev? I had a feeling some core devs were opposed to this (I'm personally -0). -- ___ Python tracker rep...@bugs.python.org

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed, 2.7 seems still affected. -- resolution: out of date - versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4106

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: So, what should I do with is_selectable.diff? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12287 ___

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +haypo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12656 ___ ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___ ___ Python-bugs-list

[issue6419] Broken test_kqueue.py on OpenBSD

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Rémi, can you reproduce this problem? Could you test the patch attached? (It's maybe already part of OPenBSD's tree, in which case it would certainly be nice to include it). -- nosy: +rpointel

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So, what should I do with is_selectable.diff? It looks ok to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12287 ___

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, I think the reason this doesn't appear in 3.2/3.3 is the fix for issue1856. In 2.x (and 3.1) daemon threads can continue executing after the interpreter's internal structures have started being destroyed. The least intrusive solution is to

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Perhaps bind_af_aware() should find its place in test.support. Also, using test.support.unlink means it filters out acceptable errnos. Also, do we want an IPv6 test with poll, or is it overkill? --

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: It would probably be simpler, safer and more efficient to simply call the POSIX function instead (but it most be exposed somewhere, by posixmodule.c I suppose). Indeed. Would it be a good idea to use the full docstring of

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I haven't seen any discussion on python-dev. Have I missed something? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12760 ___

[issue12760] Add create mode to open()

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I haven't seen any discussion on python-dev. Have I missed something? It was on Python-ideas actually: http://mail.python.org/pipermail/python-ideas/2011-August/011183.html -- ___ Python

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: In Antoine's patch, ISTM that the line created_by_this_process = ... could also be deleted, as the patch no longer uses that value and it's not used anywhere later in the method. -- nosy: +vinay.sajip

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: i12801.patch is not correct: on Windows, you should never encode a filename to bytes. Use PyUnicode_Decode() + _Py_wrealpath(), or a #ifdef (as many other posixmodule functions). I prefer to reuse _Py_wrealpath because we will

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You might want to add a comment in the patch that the cloexec flag is removed from the child's pipes by calling dup2() before exec() :) I was a bit baffled at first when reading the patch. -- ___

[issue8713] multiprocessing needs option to eschew fork() under Linux

2011-08-24 Thread Ask Solem
Ask Solem a...@celeryproject.org added the comment: I have suspected that this may be necessary, not just merely useful, for some time, and issue6721 seems to verify that. In addition to adding the keyword arg to Process, it should also be added to Pool and Manager. Is anyone working on a

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ah, right. Well I think all arguments against it were quite weak (or even wrong). Let's see: - it's not cross-platform: actually it is (OS_EXCL has been POSIX since at least 1997 (*), and Windows also has it) - os.open followed by os.fdopen is

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: With comment. I'll add a similar comment to default. -- Added file: http://bugs.python.org/file23032/subprocess_cloexec-1.diff ___ Python tracker rep...@bugs.python.org

[issue8713] multiprocessing needs option to eschew fork() under Linux

2011-08-24 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: No one is currently working on a patch AFAIK -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d316315a8781 by Antoine Pitrou in branch '2.7': Issue #4106: Fix occasional exceptions printed out by multiprocessing on interpreter shutdown. http://hg.python.org/cpython/rev/d316315a8781 -- nosy:

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This should hopefully be fixed now. Feel free to reopen if it isn't. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: New patch. Perhaps bind_af_aware() should find its place in test.support. I'm not sure, it's really specific to this test. Also, using test.support.unlink means it filters out acceptable errnos. Thanks, I didn't know about this.

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Looks good to me :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12656 ___ ___

[issue12760] Add create mode to open()

2011-08-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: - os.open followed by os.fdopen is easy: it isn't that easy to get the incantation right (the pure Python open() in _pyio is 70 lines of code), especially if you want the file object to have the right name attribute What if we can

[issue12803] SSLContext.load_cert_chain() should accept a password argument

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I have one last concern: what is the character set of an OpenSSL password? I see you are using PyUnicode_AsEncodedString(x, NULL, NULL), which basically returns a utf8-encoded bytestring. Since the OpenSSL doc don't specify anything, we could

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Patch to get #ifdef REALPATH_SUPPORT_NULL: diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -1539,6 +1539,17 @@ if test $have_pthread_t = yes ; then #endif ]) fi + +AC_MSG_CHECKING(for realpath

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b07b0b7517da by Charles-François Natali in branch 'default': Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore. http://hg.python.org/cpython/rev/b07b0b7517da -- nosy: +python-dev

[issue1298813] sysmodule.c: realpath() is unsafe

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See issue #12801: it has a more recent patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298813 ___

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: What if we can override the inner call to os.open()? For example, io.open() could grow an additional argument fd_opener which defaults to the equivalent of os.open. I agree it would be a much better situation than what we have now. --

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I prefer to reuse _Py_wrealpath because we will have to add special cases: realpath(NULL) and also maybe canonicalize_file_name(). I read that canonicalize_file_name(name) just calls realpath(name, NULL), so we can maybe avoid

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___

[issue3754] cross-compilation support for python build

2011-08-24 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: Added file: http://bugs.python.org/file23034/python-py3k-20110825-CROSS.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3754 ___

[issue12760] Add create mode to open()

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: open(filename, 'w', fd_opener=lambda path, mode: os.open(path, mode|os.O_CREAT) I prefer open(name, c). it doesn't fill a use case: actually, avoiding race conditions is an important use case, ... It may help the

[issue3871] cross and native build of python for mingw32 with distutils

2011-08-24 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: follow recent changes to distutils and packaging modules and platform tests without os major version ... (require python-py3k-20110825-CROSS.patch from #3754) -- Added file:

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Patch to get #ifdef REALPATH_SUPPORT_NULL: I'm not really familiar with autotools, but I have the impression that this will only check that the given code snippet compiles (and it will), and we want to check that a NULL buffer is

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2011-08-24 Thread David Watson
New submission from David Watson bai...@users.sourceforge.net: Changeset 4736e172fa61 for issue #12810 removed the test msg-msg_controllen 0 from socketmodule.c, where msg_controllen happened to be unsigned on the reporter's system. I included this test deliberately, because msg_controllen

[issue12836] cast() creates circular reference in original object

2011-08-24 Thread Benjamin Gilbert
New submission from Benjamin Gilbert bgilb...@backtick.net: Section 15.17.1.15 of the ctypes documentation illustrates the use of cast() thusly: a = (c_byte * 4)() cast(a, POINTER(c_int)) ctypes.LP_c_long object at ... Executing the cast() causes a._objects to gain a reference back to a:

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2011-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12837 ___ ___ Python-bugs-list mailing

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I included this test deliberately, because msg_controllen may be of signed type [...] POSIX allows socklen_t to be signed http://pubs.opengroup.org/onlinepubs/007908799/xns/syssocket.h.html sys/socket.h makes available a type,

[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I checked in glibc, FreeBSD and OpenBSD source codes, and they all define socklen_t as an unsigned integer. I think the confusion arises from this: The third argument of accept() was originally declared as an int * (and is

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess_cloexec-1.diff: I'm too tired too review the test. The subprocess.py part looks correct, except the pipe2 name. Python 3 uses _create_pipe = _posixsubprocess.cloexec_pipe. Pick one of those. --

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It's surprising to raise a SkipTest *at the end* of the test. Here is another patch. -- Added file: http://bugs.python.org/file23037/chown_hpux-2.diff ___ Python tracker

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 603025e2d39d by Charles-François Natali in branch 'default': Issue #12656: Fix test_asyncore failures on Windows buildbots. http://hg.python.org/cpython/rev/603025e2d39d --

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file23038/chown_hpux-3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file23037/chown_hpux-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file23039/chown_hpux-4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Using chown_hpux-4.diff, we don't skip anything on HP-UX. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-08-24 Thread John O'Connor
John O'Connor tehj...@gmail.com added the comment: You are right about those lines in particular; 'dubious' as you say. Though, the point overall was that the general implementation was noticeably faster (regardless of those smaller changes). However, I do think that the single check for len ==

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-08-24 Thread John O'Connor
Changes by John O'Connor tehj...@gmail.com: Removed file: http://bugs.python.org/file23040/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12807 ___

[issue12807] Optimizations for {bytearray,bytes,unicode}.strip()

2011-08-24 Thread John O'Connor
John O'Connor tehj...@gmail.com added the comment: Antoine Pitrou pit...@free.fr added the comment: This looks like a dubious micro-optimization. If len == 0, all loops will exit early anyway (same for similar snippets in bytesobject.c and unicodeobject.c). You are right about those lines

[issue12801] C realpath not used by os.path.realpath

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le mercredi 24 août 2011 23:45:00, vous avez écrit : Charles-François Natali neolo...@free.fr added the comment: Patch to get #ifdef REALPATH_SUPPORT_NULL: I'm not really familiar with autotools, but I have the impression that

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Using chown_hpux-4.diff, we don't skip anything on HP-UX. Victor, I don't understand your patch: if we try chown()ing a file to root, then this will fail on HP-UX (because chown won't fail with EPERM). That's the whole point of the

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file23039/chown_hpux-4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5113 ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: if we try chown()ing a file to root, then this will fail on HP-UX Oooh, I'm confused. I removed this stupid patch. -- ___ Python tracker rep...@bugs.python.org

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: # HP-UX and Solaris allow a non-root user to chown to root I didn't see failure on our Solaris / OpenIndiana buildbot. Should we really skip the test on Solaris? -- ___ Python tracker

[issue12287] ossaudiodev: stack corruption with FD = FD_SETSIZE

2011-08-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You might replace #if defined(_MSC_VER) with #if defined(MS_WINDOWS), but in another commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12287

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Well, IIRC, I read in the Solaris man pages that it behaves like HP-UX in this regard. But this it can be changed with `setprivgrp`, so it might work on some machines, and fail on others. According to

[issue12656] test.test_asyncore: add tests for AF_INET6 and AF_UNIX sockets

2011-08-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f3444d795062 by Charles-François Natali in branch 'default': Issue #12656: Really fix test_asyncore failures on Windows buildbots... http://hg.python.org/cpython/rev/f3444d795062 --

[issue6676] expat parser throws Memory Error when parsing multiple files

2011-08-24 Thread David H. Gutteridge
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: The documentation should definitely be updated to clarify that a parser instance is not reusable with more than one file. I had a look at the equivalent documentation for Perl and TCL, and Perl's implementation explicitly does

[issue7983] The encoding map from Unicode to CP932 is different from that of Windows'

2011-08-24 Thread Nayuta Taga
Changes by Nayuta Taga ganaware+bugs.python@gmail.com: Removed file: http://bugs.python.org/file16301/cp932_roundtrip.tar.bz2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7983 ___

[issue7983] The encoding map from Unicode to CP932 is different from that of Windows'

2011-08-24 Thread Nayuta Taga
Nayuta Taga ganaware+bugs.python@gmail.com added the comment: I have updated the tables about the latest Pythons (2.7.2, 3.2.1). The patches for 2.7a3 can be applied to 2.7.2 and 3.2.1 successfully. The latest Pythons still have the problem. Their encoding maps from Unicode to CP932 are

[issue12838] FAQ/Programming typo: range[3] is used

2011-08-24 Thread Eli Bendersky
New submission from Eli Bendersky eli...@gmail.com: User report from docs@python: On http://docs.python.org/faq/programming.html for i in range[3]: Should be: for i in range(3): -- assignee: docs@python components: Documentation keywords: easy messages: 142952 nosy: docs@python,

[issue12832] The documentation for the print function should explain/point to how to control the sys.stdout encoding

2011-08-24 Thread Zachary Richey
Zachary Richey mach1...@gmail.com added the comment: I'm not sure if this is good documentation, but it explains how the encoding is gotten for stdout and stderr. -- keywords: +patch nosy: +mach1723 Added file: http://bugs.python.org/file23042/functions_print_doc.patch

[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-24 Thread rmtew
New submission from rmtew richard.m@gmail.com: zlibmodule.c calling inflateInit2 and deflateInit2 will subsequently proceed to crash in the case where these functions return Z_VERSION_ERROR. zlib implementation note: When you compile against zlib, several functions (actually macros) like

  1   2   >