[issue16500] Add an 'atfork' module

2013-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Given PEP 446 (fds are now CLOEXEC by default) I prepared an updated patch > where the fork lock is undocumented and subprocess no longer uses the fork > lock. (I did not want to encourage the mixing of threads with fork() without &g

[issue19465] selectors: provide a helper to choose a selector using constraints

2013-11-01 Thread Charles-François Natali
Charles-François Natali added the comment: Of course, when I have 300 connections to remote nodes, I use poll() to multiplex between them. But there are times when you can have a large number of threads running concurrently, and if many of them call e.g. subprocess.check_output() at the same

[issue19017] selectors: towards uniform EBADF handling

2013-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > What is the status of this issue? AFAICT, we haven't reached a consensus yet on the best way to handle EBADF. -- ___ Python tracker <http://bugs.python.org

[issue19017] selectors: towards uniform EBADF handling

2013-11-04 Thread Charles-François Natali
Charles-François Natali added the comment: > By which you mean that you still don't agree with my proposal? Which is to > fix it for most syscalls but not for select(), poll() and similar (anything > that the new selectors module interfaces to). I agree with your proposal, but

[issue18923] Use the new selectors module in the subprocess module

2013-11-05 Thread Charles-François Natali
Charles-François Natali added the comment: Here's an updated patch with a better logic: in the previous version - based on current poll-based implementation, the FD was inferred from the event (i.e. read ready -> stdout/stderr, write ready -> stderr). The new version directly check

[issue18923] Use the new selectors module in the subprocess module

2013-11-08 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-08 Thread Charles-François Natali
Charles-François Natali added the comment: > When I try this with a UDP socket, the thread calling shutdown > raises an OS Error (transport end point not connected). Which is normal, since UDP sockets aren't connected. > In contrast, sock.close does not cause the blocked thr

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-08 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file32549/3bf73dcd0b42.diff ___ Python tracker <http://bugs.python.org/issue18874> ___ ___ Pytho

[issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter

2013-11-09 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-10 Thread Charles-François Natali
Charles-François Natali added the comment: > After some research... > >> Which is normal, since UDP sockets aren't connected. > > But UDP sockets can be connected! > No, they can't. "Connecting" a UDP socket doesn't established a duplex connec

[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Charles-François Natali
Charles-François Natali added the comment: I think it's simply due to file descriptor inheritance (files being inherited by other subprocess instance): since Windows can't remove open files, kaboom. It doesn't have anything to do with threads. --

[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-14 Thread Charles-François Natali
Charles-François Natali added the comment: > Bernt Røskar Brenna added the comment: > > @neologix: How can it not have anything to do with threads? > > - It always works with max_workers == 1 > - When max_workers == 2, shutil.rmtree sometimes fails It has nothing to do with

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-15 Thread Charles-François Natali
Charles-François Natali added the comment: > mpb added the comment: > > Someone wrote a kernel patch based on my bug report. > > http://www.spinics.net/lists/netdev/msg257653.html It's just a patch to avoid returning garbage in the address. But AFAICT, recvfrom() returning

[issue19575] subprocess.Popen with multiple threads: Redirected stdout/stderr files still open after process close

2013-11-15 Thread Charles-François Natali
Charles-François Natali added the comment: > R. David Murray added the comment: > > neologix noted that *when redirection is used* the way that *all* windows > file handles are inherited changes. That's true (but that was from

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-19 Thread Charles-François Natali
Charles-François Natali added the comment: Would it be possible to generate a clean patch? The latest one contains many unrelated commits. -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue18

[issue19506] subprocess.communicate() should use a memoryview

2013-11-20 Thread Charles-François Natali
Charles-François Natali added the comment: > Serhiy Storchaka added the comment: > > I don't know. But a function call have a cost. I'm with Serhiy here. Writing a performance optimization without benchmark is generally a bad idea (

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-20 Thread Charles-François Natali
Charles-François Natali added the comment: I made a review at http://bugs.python.org/review/18874/#ps9860 (not sure you got notified). -- ___ Python tracker <http://bugs.python.org/issue18

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-21 Thread Charles-François Natali
Charles-François Natali added the comment: If you really want to use packing, keep it. But please remove this: """ +/* ensure that the frame_t structure is packed */ +assert(sizeof(frame_t) == (sizeof(PyObject

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-21 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > I'm not convinced myself that hashtable.c/h can be reused immediatly, so I > prefer to move these two files to Modules. The files may be moved later if > the containers are reused. Please

[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-22 Thread Charles-François Natali
Charles-François Natali added the comment: Victor, is the attached patch up-to-date? -- ___ Python tracker <http://bugs.python.org/issue18874> ___ ___ Python-bug

[issue19465] selectors: provide a helper to choose a selector using constraints

2013-11-23 Thread Charles-François Natali
Charles-François Natali added the comment: > Antoine Pitrou added the comment: > > I think this is more of a documentation issue. People who don't want a new fd > can hardcode PollSelector (poll has been POSIX for a long time). That's also what I now think. I don't

[issue19777] Provide a home() classmethod on Path objects

2013-11-25 Thread Charles-François Natali
Charles-François Natali added the comment: IMO, this functionality is subsumed by http://bugs.python.org/issue19776 (Path.expanduser). -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue19

[issue19798] tracemalloc: rename "max_size" to "peak_size" in get_traced_memory() result

2013-11-26 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > @neologix: I would like your opinion first, because you accepted the PEP. Well, I'm not a native speaker, but "peak" does sound better than "max" (I'd say the later

[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

2013-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: > Antoine Pitrou added the comment: > > Calling it _PyThread_set_key_value is prone to confusion. > Ideally we would fix PyThread_set_key_value's behaviour. Are there users of > the function outside from CPython? The question i

[issue19813] Add a new optional timeout parameter to socket.socket() constructor

2013-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: I'm with Antoine, this is *really* going too far. SOCK_CLOEXEC and friends are useful to avoid race conditions: there's no such concern with the non-blocking flag. Shaving one or two syscalls is IMO completely useless, and doesn't justify

[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

2013-11-28 Thread Charles-François Natali
Charles-François Natali added the comment: AFAICT, there's no link (FWIW I wrote the patch for #10517, then the fix for threads created outside of Python calling into a subinterpreter - issue #13156). Actually, this "fix" would have avoided the regression in issue #13156. But si

[issue19836] selectors: improve examples section

2013-11-29 Thread Charles-François Natali
New submission from Charles-François Natali: Here's a patch improving the "examples" section for the selectors module. -- assignee: docs@python components: Documentation files: selectors_examples.diff keywords: needs review, patch messages: 204750 nosy: docs@python, ne

[issue19836] selectors: improve examples section

2013-11-29 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file32894/selectors_examples.diff ___ Python tracker <http://bugs.python.org/issue19836> ___ ___

[issue19836] selectors: improve examples section

2013-11-29 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file32895/selectors_examples.diff ___ Python tracker <http://bugs.python.org/issue19836> ___ ___

[issue19836] selectors: improve examples section

2013-11-29 Thread Charles-François Natali
Charles-François Natali added the comment: Here's an updated patch adding your echo server to the examples section. -- Added file: http://bugs.python.org/file32899/selectors_example-1.diff ___ Python tracker <http://bugs.python.org/is

[issue19506] subprocess.communicate() should use a memoryview

2013-11-30 Thread Charles-François Natali
Charles-François Natali added the comment: Could someone with a dual-core machine try the attached simplistic benchmark with and without Victor's patch? I can see some user-time difference with 'time' on my single-core machine, but I'm curious to see how this would affect

[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali
New submission from Charles-François Natali: Initially, BaseSelector was simply designed as the base implementation used by concrete ones like SelectSelector & Co. Then BaseSelector evolved to be an ABC, but the problem is that it's really not usable as such: the register() and u

[issue18885] handle EINTR in the stdlib

2013-11-30 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, here's a first step: select/poll/epoll/etc now return empty lists/tuples upon EINTR. This comes with tests (note that all those tests could probably be factored, but that's another story). -- keywords: +needs review, patch st

[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali
Charles-François Natali added the comment: > I'm wondering, is there a reason we made BaseSelector a public API? The idead was to have an ABC so that users can implement their own selector, and pass it to e.g. asyncio or anything alse expecting a selector. Other than that, the only use

[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali
Charles-François Natali added the comment: > The problem for documentation use is that we're christening it as an > official API, and thus it becomes more difficult to refactor the > inheritance hierarchy. So what would you suggest? --

[issue18643] implement socketpair() on Windows

2013-11-30 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch adding socketpair to test.support. This version has been used in test_selectors for quite some time now, and would probably be useful for other tests as well. -- Added file: http://bugs.python.org/file32909/socketpair-1

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Guido van Rossum added the comment: > > LGTM, although I wish that you had time to implement the comment "TODO: > Subclasses can probably optimize this even further" rather than just > shuffling the existing code around. :-)

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Just for the record, I was initially in favor of recomputing the timeout and retrying upon EINTR, but Guido prefers to return empty lists, and since that's a better compromise than the current situation (I've seen *many* people complainin

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > >> I think that's a cleaner design. > > For common containers like Sequence or Mapping, ABC are useful. But I don't > expect new implementations of BaseSelector. Is it just for

[issue19506] subprocess.communicate() should use a memoryview

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Impressive speedup :-) -- ___ Python tracker <http://bugs.python.org/issue19506> ___ ___ Python-bugs-list mailin

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Well this is wishing thinking, since by returning an empty list you > force the user to handle EINTR - just in a different way. I know that returning an empty list changes the semantics: I just think that's better - or not as bad - than

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Charles-François Natali
New submission from Charles-François Natali: asyncio makes heavy use of SIGCHLD for subprocesses. A consequence of this if that a lot of syscalls can fail with EINTR (see e.g. issue #18885). The attached patch uses SA_RESTART (through signal.siginterrupt()) to limit EINTR occurrences, e.g

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: How about this? -- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file32924/selectors_select_signal.diff ___ Python tracker <http://bugs.python.org/issu

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 3.4 ___ Python tracker <http://bugs.python.or

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali : -- status: open -> pending ___ Python tracker <http://bugs.python.org/issue18843> ___ ___ Python-bugs-list mailing list Un

[issue1611154] os.path.exists("file/") failure on Solaris 9

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> rejected stage: patch review -> committed/rejected status: pending -> closed ___ Python tracker <http://bugs.python.org/

[issue18994] Inside fcntl module, we does not check the return code of all_ins function

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Vajrasky, thanks for the patch! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18843] Py_FatalError (msg=0x7f0e3b373232 "bad leading pad byte") at Python-2.7.5/Python/pythonrun.c:1689

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks for the feedback! -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: > It sounds like doing this is fine (as Glyph suggests in the email thread) but > it isn't magically going to solve all EINTR problems, just reduce the number > of calls that could encounter them. Indeed, hence "*limit* EINTR occur

[issue19857] test_imaplib doesn't always reap SocketServer thread

2013-12-01 Thread Charles-François Natali
New submission from Charles-François Natali: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/5901/steps/test/logs/stdio """ [134/387/1] test_signal Timeout (1:00:00)! Thread 0x000801e24800 (most recent call first): File "/usr/home/buildbo

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-02 Thread Charles-François Natali
Charles-François Natali added the comment: > Guido van Rossum added the comment: > > That's just rhetoric -- I am beginning to believe that nobody has any data. > Here's some opposite rhetoric. If it ain't broke, don't fix it. Plus, if > it's so mu

[issue19875] test_getsockaddrarg occasional failure

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: This test is inherently subject to a race condition: """ port = support.find_unused_port() [...] try: self.assertRaises(OverflowError, sock.bind, (host, big_port)) self.assertRaise

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: Well, unregister() documentation currently contains this: """ .. method:: unregister(fileobj) Unregister a file object from selection, removing it from monitoring. A file object shall be unregistered prior to being close

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: > The patch is fine, but it is hard to rely on it to prevent bugs from > happening because that requires cooperation from all modules registering > signal handlers. Once again, that's why the bug report says "*limit* EINTR occurr

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: > Guido van Rossum added the comment: > > I think you're looking for the discussion in issue 19017. > > IIRC the conclusion is that not only do you not get the same error > everywhere, but you get it at different points -- so

[issue19787] tracemalloc: set_reentrant() should not have to call PyThread_delete_key()

2013-12-03 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > Kristján> Only that issue #10517 mentions reasons to keep the old behavior, > specifically http://bugs.python.org/issue10517#msg134573 (...) > > @Kristján: The behaviour of PyThread_set_ke

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

2013-12-04 Thread Charles-François Natali
Charles-François Natali added the comment: I agree with Antoine. Silencing warning is fine, as long as it's not to the detriment of clarity (see Debian Openssl's vulnerability extreme example). -- ___ Python tracker <http://bu

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-05 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-06 Thread Charles-François Natali
Charles-François Natali added the comment: Sorry for the delay, I didn't have any free time this week. I'll review the patch shortly, but the idea sounds fine (I just need to check if we can't be a little more specific for errnos

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-06 Thread Charles-François Natali
Charles-François Natali added the comment: > Guido van Rossum added the comment: > > Here's an attempt at fixing the ValueError. > > I don't like the exhaustive search much, but the alternative is to maintain > an inverse dict. What do you think? I was going t

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-07 Thread Charles-François Natali
Charles-François Natali added the comment: LGTM! -- ___ Python tracker <http://bugs.python.org/issue19876> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19857] test_imaplib doesn't always reap SocketServer thread

2013-12-07 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: The test is failing on Windows buildbot: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1851/steps/test/logs/stdio """ =

[issue19929] subprocess: increase read buffer size

2013-12-08 Thread Charles-François Natali
New submission from Charles-François Natali: This is a spinoff of issue #19506: currently, subprocess.communicate() uses a 4K buffer when reading data from pipes. This was probably optimal a couple years ago, but nowadays most operating systems have larger pipes (e.g. Linux has 64K), so we

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > I don't like generic "except OSError: pass". Here is a first patch for > epoll() to use "except FileNotFoundError: pass" instead. Kqueue selector > should also be patch

[issue19929] subprocess: increase read buffer size

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > Since Popen.communicate() returns the whole content of the buffer, would it > be safe to increase the buffer size? For example, use 4 GB as the buffer size? Sure, if you want to pay the CPU and mem

[issue19923] OSError: [Errno 512] Unknown error 512 in test_multiprocessing

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: Looks like a kernel bug. errno 512 is ERESTARTSYS, which shouldn't leak to user-mode. -- ___ Python tracker <http://bugs.python.org/is

[issue19929] subprocess: increase read buffer size

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > Roundup Robot added the comment: > > New changeset 03a056c3b88e by Gregory P. Smith in branch '3.3': > Fixes issue #19929: Call os.read with 32768 within subprocess.Popen > http://hg.python.org/cpython/rev/03a056c3b88e No

[issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

2013-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > I will look into the Windows problem, but I suspect the best we can do there > is skip the test. I already took care of that: http://hg.python.org/cpython/rev/01676a4c16ff -- ___ Python tracker

[issue13223] pydoc removes 'self' in HTML for method docstrings with example code

2014-06-21 Thread Charles-François Natali
Charles-François Natali added the comment: Berker, I've committed your patch, thanks! -- nosy: +neologix ___ Python tracker <http://bugs.python.org/is

[issue21491] race condition in SocketServer.py ForkingMixIn collect_children

2014-06-21 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: resource usage -> behavior versions: +Python 3.3, Python 3.4 ___ Python tr

[issue21819] Remaining buffer from socket isn't available anymore after calling socket.recv the first time

2014-06-21 Thread Charles-François Natali
Charles-François Natali added the comment: > If I'm receiving data from a socket (several bytes) and making the > first call to socket.recv(1) all is fine but the second call won't get > any further data. But doing this again with socket.recv(2) instead will > successfully

[issue21819] Remaining buffer from socket isn't available anymore after calling socket.recv the first time

2014-06-21 Thread Charles-François Natali
Charles-François Natali added the comment: > I'm wondering how would it be possible then to fetch packets of an unknown > size without using an extremely big buffer. IP packets are limited to 64K, so just pass a 64K buffer, that's not "extremely big". If you really

[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: There's probably a special mechanism due to vserver which makes the kernel kill the process instead of failing with EPERM, but it's really surprising. What happens if you try the following: $ python -c "from resource import *; _, h

[issue21090] File read silently stops after EIO I/O error

2014-07-02 Thread Charles-François Natali
Charles-François Natali added the comment: LGTM. -- ___ Python tracker <http://bugs.python.org/issue21090> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18887] test_multiprocessing.test_connection failure on Python 2.7

2014-07-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue21913] threading.Condition.wait() is not interruptible in Python 2.7

2014-07-11 Thread Charles-François Natali
Charles-François Natali added the comment: > So do we agree that the resolution for this is "wont fix"? Yes. We don't want to backport this (we've had enough regressions already, and people have been living withut loc interruptibility for a long time before Python 3).

[issue22013] Add at least minimal support for thread groups

2014-07-20 Thread Charles-François Natali
Charles-François Natali added the comment: > Tin Tvrtković added the comment: > > For your examples, my first instinct would be to use a thread pool executor. > It's a nice high level API and can already do the aggregate join. Indeed, the examples posted don't make much

[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-21 Thread Charles-François Natali
Charles-François Natali added the comment: >> rdmurray@pydev:~/python/p34>python -c 'import resource; >> print(resource.getrlimit(resource.RLIMIT_NOFILE))' >> (1024L, 1048576L) > > Oh, 1 million files is much bigger than 4 thousand files (4096). > >

[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-21 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, I'll cap the value then (no need to expose FD_SETSIZE). -- ___ Python tracker <http://bugs.python.org/is

[issue22040] Add a "force" parameter to shutil.rmtree

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: On Unix at least, this doesn't apply: rm -f doesn't mean "ignore permissions", but but rather don't ask confirmation which the rm commands asks in some cases (empty file, directory, etc). Ans the code posted wouldn't

[issue21772] platform.uname() not EINTR safe

2014-07-22 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> handle EINTR in the stdlib ___ Python tracker <http://bugs.python

[issue22007] sys.stdout.write on Python 2.7 is not EINTR safe

2014-07-22 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> handle EINTR in the stdlib ___ Python tracker <http://bugs.python

[issue22040] Add a "force" parameter to shutil.rmtree

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Actually it does apply on unix: No, it does not apply: here's what I've written: """ rm -f doesn't mean "ignore permissions", but but rather don't ask confirmation which the rm commands asks in some c

[issue17293] uuid.getnode() MAC address on AIX

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: Thanks for the patch, but I'm not even sure AIX is an officially supported platform, so I'm not sure what to do with this patch. -- nosy: +neologix ___ Python tracker <http://bugs.python.o

[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: Sorry for the delay, should be fixed now. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: Jerrfey, thanks for your patch, but apparently in the - long - meantime, the declaration has already been moved up. -- nosy: +neologix resolution: -> out of date stage: -> resolved status: open -&g

[issue17391] _cursesmodule Fails to Build on GCC 2.95 (static)

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Jeffrey Armstrong added the comment: > > Next time I see a bug I'll be sure to wait rather than actually submit a > patch... I understand your frustration, but please don't do that: you have to understand that we don't hav

[issue22040] Add a "force" parameter to shutil.rmtree

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: > In other words, on unix shutil.rmtree is *already* 'rm -rf'. Exactly :-) -- ___ Python tracker <http://bugs.pytho

[issue17293] uuid.getnode() MAC address on AIX

2014-07-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Huh? What does officially supported platform mean? CPython builds and runs > on AIX. It means a platform for which we have regular contributors committed to support the port, and ideallly with a stable buildbot. We apparently have an un

[issue21566] make use of the new default socket.listen() backlog argument

2014-07-23 Thread Charles-François Natali
Charles-François Natali added the comment: Committed, thanks for the reviews (I only updated one call to socket.listen(), inside multiprocessing, the rest is in the test suite). -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue19776] Provide expanduser() on Path objects

2014-07-23 Thread Charles-François Natali
Charles-François Natali added the comment: > There is a question. What should pathlib's expanduser() do in case > when user directory can't be determined (or user does not exist)? > Perhaps unlike to os.path.expanduser() it should raise an exception > (as in many other path

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-23 Thread Charles-François Natali
Charles-François Natali added the comment: Barring any objection, I'll commit the patch attached within a couple days. -- title: implement socketpair() on Windows -> add a fallback socketpair() implementation in test.support Added file: http://bugs.python.org/file36050/sock

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-23 Thread Charles-François Natali
Charles-François Natali added the comment: > You should copy the code from asyncio.windows_utils.socketpair(). It checks > also type and proto parameter: raise a ValueError for unsupported values > (only SOCK_STREAM and proto=0 are supported). It also supports IPv6. It

[issue18643] add a fallback socketpair() implementation in test.support

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: > By the way, we should reuse socket.socketpair() in > asyncio.windows_utils. The Tulip is written for Python 3.3 and shares > exactly the same code base, so you should write > > Something like: > > if hasattr(socket, 'sock

[issue19875] test_getsockaddrarg occasional failure

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file36070/find_unused_race.diff ___ Python tracker <http://bugs.python.org/issue19875> ___

[issue22018] Add a new signal.set_wakeup_socket() function

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: As I said offline to Victor, I think it would be better to have a single function, i.e. keep set_wakeup_fd(). It makes the API simpler, less confusing and error prone: some people will wonder which one they should use, might end up using the wrong

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: The patch looks good. I just think it would be nice to expose _fdcount() in test.support. -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue18

[issue21035] Python's HTTP server implementations hangs after 16.343 requests on MacOSX

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: I'm closing, since it's amlost certainly an OS-X bug (similar to time-wit socket exhaustion & Co). -- resolution: -> third party stage: -> resolved status: open -> closed __

[issue12184] socketserver.ForkingMixin collect_children routine needs to collect only it's children

2014-07-24 Thread Charles-François Natali
Charles-François Natali added the comment: Closing as wont't fix, since we now have asyncio which handles this much better. -- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed ___ Python tracker <http:

<    10   11   12   13   14   15   16   17   18   19   >