[issue6419] Broken test_kqueue.py on OpenBSD

2011-08-24 Thread Remi Pointel
Remi Pointel added the comment: Hi, I think this issue is relied to issue 12181. I have made tests. 1)with no patch: testPair (__main__.TestKQueue) ... ok test_create_event (__main__.TestKQueue) ... FAIL test_create_queue (__main__.TestKQueue) ... ok test_queu

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

2011-08-24 Thread Adam Simpkins
Adam Simpkins added the comment: Here's a patch with updates to the documentation to more fully specify the behavior of the password field, including specifying that strings will be encoded using UTF-8. -- Added file: http://bugs.python.org/file23043/ssl-password.4.patch __

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

2011-08-24 Thread Adam Simpkins
Adam Simpkins added the comment: OpenSSL doesn't appear to do any special handling for i18n, and just treats the strings as binary data. It uses fgets() to read the password from the terminal, so it will receive it however the terminal encodes it. It's not clear to me that PyUnicode_EncodeFSDe

[issue12839] zlibmodule cannot handle Z_VERSION_ERROR zlib error

2011-08-24 Thread rmtew
New submission from rmtew : 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 inflateInit2 and deflat

[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 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 __

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

2011-08-24 Thread Eli Bendersky
New submission from Eli Bendersky : 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, eli.bendersky prior

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

2011-08-24 Thread Nayuta Taga
Nayuta Taga 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 different from those of Windows'. ---

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

2011-08-24 Thread Nayuta Taga
Changes by Nayuta Taga : Removed file: http://bugs.python.org/file16301/cp932_roundtrip.tar.bz2 ___ Python tracker ___ ___ Python-bugs-list mai

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

2011-08-24 Thread David H. Gutteridge
David H. Gutteridge 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 not allow attempts to reus

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

2011-08-24 Thread Roundup Robot
Roundup Robot 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 -- ___ Python tracker <

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 http://unix.derkeiler.com/Newsgroups/comp.unix.sola

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-08-24 Thread STINNER Victor
STINNER Victor added the comment: You might replace "#if defined(_MSC_VER)" with "#if defined(MS_WINDOWS)", but in another commit. -- ___ Python tracker ___ ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor 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

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor 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 ___

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file23039/chown_hpux-4.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 patch.

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

2011-08-24 Thread STINNER Victor
STINNER Victor added the comment: Le mercredi 24 août 2011 23:45:00, vous avez écrit : > Charles-François Natali 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

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

2011-08-24 Thread John O'Connor
John O'Connor added the comment: Antoine Pitrou 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 in particular; 'dubious' as y

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

2011-08-24 Thread John O'Connor
Changes by John O'Connor : Removed file: http://bugs.python.org/file23040/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2011-08-24 Thread John O'Connor
John O'Connor 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 == 0 saves time part

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor added the comment: Using chown_hpux-4.diff, we don't skip anything on HP-UX. -- ___ Python tracker ___ ___ Python-bugs-

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file23039/chown_hpux-4.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file23037/chown_hpux-2.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file23038/chown_hpux-3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

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

2011-08-24 Thread Roundup Robot
Roundup Robot 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 -- ___ Python tracker

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2011-08-24 Thread STINNER Victor
STINNER Victor 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 _

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

2011-08-24 Thread STINNER Victor
STINNER Victor 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. -- ___ Pyt

[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 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 that under libc4

[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 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 """ makes available a type, socklen_t, which is an unsig

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

2011-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

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

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

2011-08-24 Thread David Watson
New submission from David Watson : 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 may be of signed type (

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 supported at runtime

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

2011-08-24 Thread Roumen Petrov
Roumen Petrov 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: http://bugs.python.org/file23035/python-py3k-20110825-MINGW.patch

[issue12760] Add create mode to open()

2011-08-24 Thread STINNER Victor
STINNER Victor 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 issue #8604 (and maybe #8

[issue3754] cross-compilation support for python build

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

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

2011-08-24 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2011-08-24 Thread STINNER Victor
STINNER Victor 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 this GNU exception. I real

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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. --

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

2011-08-24 Thread STINNER Victor
STINNER Victor added the comment: See issue #12801: it has a more recent patch. -- ___ Python tracker ___ ___ Python-bugs-list mail

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

2011-08-24 Thread Roundup Robot
Roundup Robot 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 ___ Pyt

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

2011-08-24 Thread STINNER Victor
STINNER Victor 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 with NULL) +realpath_suppor

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 accept it as a b

[issue12760] Add create mode to open()

2011-08-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc 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 override the i

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[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 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. > Also, do we w

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 __

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Roundup Robot
Roundup Robot 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: +python-dev

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

2011-08-24 Thread Jesse Noller
Jesse Noller added the comment: No one is currently working on a patch AFAIK -- ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 easy: it isn't

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

2011-08-24 Thread Ask Solem
Ask Solem 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 patch? If not I will work

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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. -- ___ Python tracker

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

2011-08-24 Thread STINNER Victor
STINNER Victor 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 have to add special cases: real

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Vinay Sajip
Vinay Sajip 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 ___ Python trac

[issue12760] Add create mode to open()

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 tracker

[issue12760] Add create mode to open()

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: I haven't seen any discussion on python-dev. Have I missed something? -- ___ Python tracker ___ ___

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 posixpath.realpath >

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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? -- ___ Python track

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 always join the

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So, what should I do with is_selectable.diff? It looks ok to me. -- ___ Python tracker ___ ___ P

[issue6419] Broken test_kqueue.py on OpenBSD

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 ___ Python tr

[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 : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[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 : -- nosy: +haypo, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue12287] ossaudiodev: stack corruption with FD >= FD_SETSIZE

2011-08-24 Thread Charles-François Natali
Charles-François Natali added the comment: So, what should I do with is_selectable.diff? -- ___ Python tracker ___ ___ Python-bugs-li

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, 2.7 seems still affected. -- resolution: out of date -> versions: -Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue12760] Add create mode to open()

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 ___

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

2011-08-24 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

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

2011-08-24 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou, rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

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

2011-08-24 Thread David Watson
David Watson 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 with a patch to add them b

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

2011-08-24 Thread David Watson
New submission from David Watson : 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 send/recvmsg() methods inherited fr

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

2011-08-24 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou 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() automatically converts anything to a C-contiguous arra

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Jesse Noller
Jesse Noller added the comment: On Wed, Aug 24, 2011 at 3:01 PM, Antoine Pitrou wrote: > > Antoine Pitrou 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 a fix should go into 2.7 ideally. http://bugs.pyt

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali added the comment: As noted by Antoine, the OS X 10.5 buildbots are also failing. -- ___ Python tracker ___ __

[issue4106] multiprocessing occasionally spits out exception during shutdown

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 ___

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's rather funky. What should the right result be? -- nosy: +pitrou ___ Python tracker ___ ___ P

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

2011-08-24 Thread Stefan Krah
New submission from Stefan Krah : 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 = memoryview(y) >>> m.to

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

2011-08-24 Thread Adam Simpkins
Adam Simpkins 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() is used even when the p

[issue12715] Add symlink support to shutil functions

2011-08-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali added the comment: Patch committed. Thanks Joel! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker __

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

2011-08-24 Thread Roundup Robot
Roundup Robot 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 _

[issue12715] Add symlink support to shutil functions

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

[issue12715] Add symlink support to shutil functions

2011-08-24 Thread Hynek Schlawack
Hynek Schlawack 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 +

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

2011-08-24 Thread Éric Araujo
Éric Araujo 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 specific sysconfig variab

[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 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 _

[issue12833] raw_input misbehaves when readline is imported

2011-08-24 Thread Idan Kamara
New submission from Idan Kamara : 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 when writing to std

[issue12333] test_packaging failures under Solaris

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 (distutils.tests.test_

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

2011-08-24 Thread Charles-François Natali
Charles-François Natali 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 testInterruptedSendmsgTimeout, it

[issue3244] multipart/form-data encoding

2011-08-24 Thread Conley Owens
Changes by Conley Owens : -- nosy: +cco3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 _password_callback() but not i

[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 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 (LOCALE, overridden by PYT

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

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou 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 micro-optimization. If len

[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 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

[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 : 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 docs for sys.stdout a

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

2011-08-24 Thread Ugra Dániel
Changes by Ugra Dániel : -- nosy: +daniel.ugra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12831] 2to3 and integer division

2011-08-24 Thread Alexander Rødseth
New submission from Alexander Rødseth : 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. -- co

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

2011-08-24 Thread trevor
New submission from trevor : 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 = externalfiles/to

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-08-24 Thread trevor
Changes by trevor : -- nosy: +trevor ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mai

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

2011-08-24 Thread trevor
Changes by trevor : -- nosy: +trevor ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mai

[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ù : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

  1   2   >