[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-25 Thread Charles-François Natali
Changes by Charles-François Natali : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-25 Thread Charles-François Natali
Changes by Charles-François Natali : -- dependencies: -_XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED usage on Solaris resolution: -> fixed stage: -> committed/rejected ___ Python tracker _

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 95ee0df1e746 by Charles-François Natali in branch 'default': Issue #12981: rewrite multiprocessing_{sendfd,recvfd} in Python. http://hg.python.org/cpython/rev/95ee0df1e746 -- ___ Python tracker

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset c158eac8e951 by Charles-François Natali in branch '2.7': Issue #12981: test_multiprocessing: catch ImportError when importing http://hg.python.org/cpython/rev/c158eac8e951 New changeset 6e04d406bb86 by Charles-François Natali in branch '3.2': Issue

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-20 Thread David Watson
David Watson added the comment: On Tue 20 Sep 2011, Charles-François Natali wrote: > I committed the patch to catch the ImportError in test_multiprocessing. This should go in all branches, I think - see issue #13022. -- ___ Python tracker

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-20 Thread Charles-François Natali
Charles-François Natali added the comment: I committed the patch to catch the ImportError in test_multiprocessing. I'll commit the other patch (pure Python version) in a couple days. > Ah, no, you're right - that's fine. Sorry for the false alarm. No problem. As they say, "better safe than so

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d91a3ba5c87 by Charles-François Natali in branch 'default': Issue #12981: test_multiprocessing: catch ImportError when importing http://hg.python.org/cpython/rev/1d91a3ba5c87 -- nosy: +python-dev ___ Py

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-19 Thread David Watson
David Watson added the comment: On Sun 18 Sep 2011, Charles-François Natali wrote: > > I had a look at this patch, and the FD passing looked OK, except > > that calculating the buffer size with CMSG_SPACE() may allow more > > than one file descriptor to be received, with the extra one going > >

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-18 Thread Charles-François Natali
Charles-François Natali added the comment: > I had a look at this patch, and the FD passing looked OK, except > that calculating the buffer size with CMSG_SPACE() may allow more > than one file descriptor to be received, with the extra one going > unnoticed - it should use CMSG_LEN() instead Th

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-18 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file23180/multiprocessing_fd-2.diff ___ Python tracker ___ ___ Pytho

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-18 Thread David Watson
David Watson added the comment: I had a look at this patch, and the FD passing looked OK, except that calculating the buffer size with CMSG_SPACE() may allow more than one file descriptor to be received, with the extra one going unnoticed - it should use CMSG_LEN() instead (the existing C implem

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-18 Thread Charles-François Natali
Charles-François Natali added the comment: > "It works fine on Linux, FreeBSD, OS X and Windows, but not on Solaris: see > issue #12999." > > Oh, thank for testing before committing :) It's hard to debug multiprocessing. Yes. Especially when you stumble upon a kernel/libc bug 25% of the time..

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-18 Thread STINNER Victor
STINNER Victor added the comment: "It works fine on Linux, FreeBSD, OS X and Windows, but not on Solaris: see issue #12999." Oh, thank for testing before committing :) It's hard to debug multiprocessing. -- ___ Python tracker

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-17 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file23166/multiprocessing_fd-1.diff ___ Python tracker ___ ___ Pytho

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-17 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch taking into account the fact that multiprocessing.reduction might not be available and importing it can raise an ImportError (which is already the case with the C implementation, but multiprocessing.reduction tests have been added recentl

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-17 Thread Charles-François Natali
Charles-François Natali added the comment: > Did you try it on Linux, FreeBSD and/or Windows? It works fine on Linux, FreeBSD, OS X and Windows, but not on Solaris: see issue #12999. -- dependencies: +_XOPEN_SOURCE usage on Solaris ___ Python track

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread STINNER Victor
STINNER Victor added the comment: - Click on "Server-side clone" on http://hg.python.org/cpython - on your computer, hg clone default myclone # default if your local clone of cpython, default branch - cd myclone; edit code; hg ci - edit .hg/hgrc to update the repository URL - hg push - for

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread Charles-François Natali
Charles-François Natali added the comment: I only tried on Linux. By the way, what's the simplest way to create a personal clone to test patches on some of the buildbots before committing them? -- ___ Python tracker

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread STINNER Victor
STINNER Victor added the comment: The patch looks correct. Did you try it on Linux, FreeBSD and/or Windows? -- ___ Python tracker ___ ___

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file23156/multiprocessing_fd.diff ___ Python tracker ___ ___ Python-

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file23166/multiprocessing_fd-1.diff ___ Python tracker ___ ___ Python-

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-15 Thread STINNER Victor
STINNER Victor added the comment: > - if the ancillay data is truncated, struct.unpack will raise an exception Well, the current C code doesn't check that the data is truncated and it works correctly, so I don't think that it would be different in Python. And yes, Python adds an extra check t

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-14 Thread Charles-François Natali
Charles-François Natali added the comment: > I don't think that it's a problem to remove private functions. > Alright. > Is it mandatory to send a non-empty message (first argument for sendmsg, b'x' > in your patch)? The original C function sends a random byte :-) > Some implementation can re

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-14 Thread STINNER Victor
STINNER Victor added the comment: I don't think that it's a problem to remove private functions. Is it mandatory to send a non-empty message (first argument for sendmsg, b'x' in your patch)? The original C function sends a random byte :-) multiprocessing_recvfd() contains cmsg_level=SOL_SOCKE

[issue12981] rewrite multiprocessing (senfd|recvfd) in Python

2011-09-14 Thread Charles-François Natali
New submission from Charles-François Natali : Now that sendmsg()/recvmsg() are exposed in socketmodule, we could use them to replace the ad-hoc FD-passing routines used by multiprocessing.reduction. Antoine suggested adding sendfd()/recvfd() methods to socket objects, but I'm not sure about thi