[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-15 Thread Richard Oudkerk
Richard Oudkerk added the comment: So there are really two situations: 1) The __main__ module *should not* be imported. This is the case if you use __main__.py in a package or if you use nose to call test_main(). This should really be detected in get_preparation_data() in the parent process

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-15 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I appear to be somehow getting child processes where __main__.__file__ is > set, but __main__.__spec__ is not. That seems to be true for the __main__ module even when multiprocessing is not involved. Running a file /tmp/foo.py containing impo

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for your hard work Nick! -- ___ Python tracker <http://bugs.python.org/issue19946> ___ ___ Python-bugs-list mailin

[issue19946] Handle a non-importable __main__ in multiprocessing

2013-12-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 19/12/2013 10:00 pm, Nick Coghlan wrote: > I think that needs to be fixed on the multiprocessing side rather than just > in the tests - we shouldn't create a concrete context for a start method > that isn't going to work on that platform

[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2014-01-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: How often has this happened? If the machine was very loaded then maybe the timeout was not enough time for the semaphore to be cleaned up by the tracker process. But I would expect 1 second to be more than ample

[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2014-01-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: It is probably harmless then. I don't think increasing the timeout is necessary -- the multiprocessing tests already take a long time. -- ___ Python tracker <http://bugs.python.org/is

[issue20153] New-in-3.4 weakref finalizer doc section is already out of date.

2014-01-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: The following from the docs is wrong: > ... module globals are no longer forced to None during interpreter > shutdown. Actually, in 3.4 module globals *sometimes* get forced to None during interpreter shutdown, so the version the __del__ method can

[issue20414] Python 3.4 has two Overlapped types

2014-01-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: _overlapped is linked against the socket library whereas _winapi is not so it can be bundled in with python3.dll. I did intend to switch multiprocessing over to using _overlapped but I did not get round to it. Since this is a private module the names of

[issue20527] multiprocessing.Queue deadlocks after “reader” process death

2014-02-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: This is expected. Killing processes which use shared locks is never going to end well. Even without the lock deadlock, the data in the pipe would be liable to be corrupted if a processes is killed while putting or getting from a queue. If you want to be

[issue20540] Python 3.3/3.4 regression in multiprocessing manager ?

2014-02-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: LGTM -- ___ Python tracker <http://bugs.python.org/issue20540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20540] Python 3.3/3.4 regression in multiprocessing manager ?

2014-02-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: BTW, I see little difference between 3.2 and the unpatched default branch on MacOSX: $ py-32/release/python.exe ~/Downloads/test_manager.py 0.0007331371307373047 8.20159912109375e-05 9.417533874511719e-05 8.082389831542969e-05 7.796287536621094e-05

[issue20660] Starting a second multiprocessing.Manager causes INCREF on all object created by the first one.

2014-02-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: On Unix, using the fork start method (which was the only option till 3.4), every sub process will incref every shared object for which its parent has a reference. This is deliberate because there is not really any way to know which shared objects a

[issue20660] Starting a second multiprocessing.Manager causes INCREF on all object created by the first one.

2014-02-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Thanks Richard. The set_start_method() call will affect any process > started from that time on? Is it possible to change idea at some point in > the future? You can use different start methods in the same program by creating different

[issue7503] multiprocessing AuthenticationError "digest sent was rejected" when pickling proxy

2014-02-28 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- assignee: -> sbt ___ Python tracker <http://bugs.python.org/issue7503> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20633] SystemError: Parent module 'multiprocessing' not loaded, cannot perform relative import

2014-03-01 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- assignee: -> sbt ___ Python tracker <http://bugs.python.org/issue20633> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20854] multiprocessing.managers.Server: problem with returning proxy of registered object

2014-03-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: I am not sure method_to_typeid and create_method were really intended to be public -- they are only used by Pool proxies. You can maybe work around the problem by registering a second typeid without specifying callable. That can be used in method_to_typeid

[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-02-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Perhaps NEWS item needed for this change. Done. -- ___ Python tracker <http://bugs.python.org/issue16743> ___ ___ Python-

[issue16743] mmap on Windows can mishandle files larger than sys.maxsize

2013-02-13 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue15528] Better support for finalization with weakrefs

2013-02-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard, do you still want to push this forward? Otherwise I'd like to > finalize the patch (in the other sense ;-). I started to worry a bit about daemon threads. I think they can still run while atexit functions are being run.* So if a da

[issue15528] Better support for finalization with weakrefs

2013-02-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 14/02/2013 3:16pm, Antoine Pitrou wrote: > Mmmh... thread switching is already blocked at shutdown: > http://hg.python.org/cpython/file/0f827775f7b7/Python/ceval.c#l434 But in Py_Finalize(), call_py_exitfuncs() is called *before* _Py_Finalizing is se

[issue16246] Multiprocessing infinite loop on Windows

2013-02-14 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- status: pending -> closed ___ Python tracker <http://bugs.python.org/issue16246> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15528] Better support for finalization with weakrefs

2013-02-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: > In any case, I think it's just something we'll have to live with. Daemon > threads are not a terrific idea in general. I agree. -- ___ Python tracker <http://bugs.py

[issue17221] Resort Misc/NEWS

2013-02-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: I did not realize there was a 'Extension Modules' section. I have been putting changes to C extensions in the 'Library' section instead. It looks like most people do the same as me. -- nosy: +sbt __

[issue17221] Resort Misc/NEWS

2013-02-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Was not it be yanked in 1fabff717ef4? Looks like it was reintroduced by this merge changeset: http://hg.python.org/cpython/rev/30fc620e240e -- ___ Python tracker <http://bugs.python.org/issu

[issue15004] add weakref support to types.SimpleNamespace

2013-02-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Good, except that you have to add a gc.collect() call for the > non-refcounted implementations. Better to use test.support.gc_collect(). -- nosy: +sbt ___ Python tracker <http://bugs.python.org/i

[issue17258] multiprocessing.connection challenge implicitly uses MD5

2013-02-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: Banning md5 as a matter of policy may be perfectly sensible. However, I think the way multiprocessing uses hmac authentication is *not* affected by the collision attacks the advisory talks about. These depend on the attacker being able to determine for

[issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '')

2013-02-21 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue17261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: A pool should only be used by the process that created it (unless you use a managed pool). If you are creating long lived processes then you could create a new pool on demand. For example (untested) pool_pid = (None, None) def get_pool

[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard, are you suggesting that we close this, or do you see an > actionable issue? (a plausible patch to the repository?) I skimmed the documentation and could not see that this restriction has been documented. So I think a documentation patch wo

[issue10527] multiprocessing.Pipe problem: "handle out of range in select()"

2013-02-26 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-26 Thread Richard Oudkerk
Richard Oudkerk added the comment: The new test seems to be reliably failing on Windows: == FAIL: test_issue17223 (__main__.UnicodeTest) -- Traceback (most

[issue17314] Stop using imp.find_module() in multiprocessing

2013-02-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think this change will potentially make the main module get imported twice under different names when we transfer pickled data between processes. The current code (which is rather a mess) goes out of its way to avoid that. Basically the main process makes

[issue17025] reduce multiprocessing.Queue contention

2013-03-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: It looks like queues_contention.diff has the line obj = pickle.dumps(obj) in both _feed() and put(). Might that be why the third set of benchmarks was slower than the second? -- ___ Python tracker <h

[issue17025] reduce multiprocessing.Queue contention

2013-03-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 04/03/2013 8:01pm, Charles-François Natali wrote: >> It looks like queues_contention.diff has the line >> >> obj = pickle.dumps(obj) >> >> in both _feed() and put(). Might that be why the third set of benchmarks >> w

[issue17364] Multiprocessing documentation mentions function that doesn't exist

2013-03-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue17364> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17367] subprocess deadlock when read() is interrupted

2013-03-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: The change in your patch is in a Windows-only section -- a few lines before the chunk you can see _winapi.GetExitCodeProcess(). Since read() on Windows never fails with EINTR there is no need for _eintr_retry_call(). If you are using Linux then there must

[issue17367] subprocess deadlock when read() is interrupted

2013-03-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: BTW, on threads are only used on Windows. On Unix select() or poll() is used. -- ___ Python tracker <http://bugs.python.org/issue17

[issue17367] subprocess deadlock when read() is interrupted

2013-03-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: I will close the issue then. If you track the problem down to a bug in Python then you can open a new one. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python track

[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: +1 To use Tools/builbot/*.bat doesn't the current directory have to be the main directory of the repository? Then I see no point in the "-C" argument: just set the correct directory automatically. I think make.bat should also support creati

[issue16895] Batch file to mimic 'make' on Windows

2013-03-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: > What does running 'kill-python before re-building python do? I have not > seen it mentioned in the in the devguide or pcbuild/readme. It kills any currently running python(_d).exe processes. This is because Windows does not allow program or li

[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: LGTM (although the warning is actually harmless). -- ___ Python tracker <http://bugs.python.org/issue17395> ___ ___ Python-bug

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2013-03-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Which does give me a thought - perhaps lru_cache in 3.4 could accept a > "key" argument that is called as "key(*args, **kwds)" to derive the cache > key? (that would be a separate issue, of course) Agreed. I suggeste

[issue17395] Wait for live children in test_multiprocessing

2013-03-11 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Why > 1? This should be commented. The manager process will always be included in active_children(). -- ___ Python tracker <http://bugs.python.org/i

[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Does this happen every time you run the tests? (I don't see these errors.) -- ___ Python tracker <http://bugs.python.org/is

[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Could you try the following program: import socket import multiprocessing import multiprocessing.reduction import multiprocessing.connection def socketpair(): with socket.socket() as l: l.bind(('localhost', 0)) l.listen(1)

[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Now could you try the attached file? (It will not work on 2.7 because a missing socket.fromfd().) P.S. It looks like the error for 3.3 is associated with a file f:\python\mypy\traceback.py which presumably clashes with the one in the standard library

[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Both 3.2 and 3.3 give essentially the same traceback as 3.2 did before, > both with installed python and yesterdays debug builds. It looks like on your machine socket handles are not correctly inherited by child processes -- I had assumed that they

[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > My original report was for 32 bit debug build on 64 bit Win 7 machine. > I just re-ran test_multiprocessing with installed 64 bit python with same > result. Was "I don't see these errors." on different Windows or non-Windows. On 64

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2013-03-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Sorry, I was not very clear. If you use the O_TEMPORARY flag with open() to get a file handle, then the share mode used with the underlying CreateFile() function is X = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE whereas, if you don'

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: Actually, it is not quite the same semantics as Unix. After you delete the the file you cannot create a file of the same name or delete the directory which contains it until the handle has been closed. However, one can work around that by moving the file

[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 14/03/2013 1:00pm, Martin v. Löwis wrote: > That's why I was asking for an actual patch. The proposed change may > well not be implementable. If os.open continues to create CRT handles, > a way needs to be found to get a CRT hand

[issue17444] multiprocessing.cpu_count() should use hw.availcpu on Mac OS X

2013-03-17 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue17444> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17389] Optimize Event.wait()

2013-03-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 22/03/2013 3:19pm, Charles-François Natali wrote: > The _flag is checked without any lock held: although it won't be a > problem with CPython, a standard memory model (e.g. Java's one) > doesn't guarantee that reading _flag outside

[issue17389] Optimize Event.wait()

2013-03-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 22/03/2013 3:31pm, Charles-François Natali wrote: >> I was under the impression that dict access (and therefore attribute >> access for "simple" objects) was guaranteed to be atomic even in >> alternative implementations like Jyt

[issue17025] reduce multiprocessing.Queue contention

2013-03-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: The old code deleted the obj in the feeder thread as soon as it was sent at lines 247 and 253 -- see Issue #16284. I think that should be retained. Apart from that LGTM. -- ___ Python tracker <h

[issue17025] reduce multiprocessing.Queue contention

2013-03-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 24/03/2013 12:16pm, Charles-François Natali wrote: > The object is overwritten by the pickled data, so it's not necessary > anymore, no? Yes, you are right. -- ___ Python tracker <http://b

[issue17555] Creating new processes after importing multiprocessing.managers consumes more and more memory

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: It seems to be a problem with ForkAwareThreadLock. Could you try the attached patch? -- Added file: http://bugs.python.org/file29593/forkawarethreadlock.patch ___ Python tracker <http://bugs.python.org/issue17

[issue17555] Creating new processes after importing multiprocessing.managers consumes more and more memory

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: _afterfork_registry is not supposed to be cleared. But the problem with ForkAwareThreadLocal meant that the size of the registry at generation n is 2**n! -- ___ Python tracker <http://bugs.python.org/issue17

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I *think* we need to keep compatibility with the wire format, but perhaps > we could use a special length value (-1?) to introduce a longer (64-bit) > length value. Yes we could, although that would not help on Windows pipe connections (wh

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 27/03/2013 5:13pm, mrjbq7 wrote: > On a machine with 256GB of RAM, it makes more sense to send arrays > of this size than say on a laptop... I was thinking more of speed than memory consumption. -- ___

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 27/03/2013 5:47pm, Charles-François Natali wrote: >> multiprocessing currently only allows sharing of such shared arrays >> using inheritance. > > You mean through fork() COW? Through fork, yes, but "shared" rather than "

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 27/03/2013 7:27pm, Charles-François Natali wrote: > > Charles-François Natali added the comment: > >> Through fork, yes, but "shared" rather than "copy-on-write". > > There's a subtlety: because of refcounting,

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 27/03/2013 8:14pm, Charles-François Natali wrote: > > Charles-François Natali added the comment: > >> Apart from creating, unlinking and resizing the file I don't think there >> should be any disk I/O. >> >> On Linu

[issue17560] problem using multiprocessing with really big objects?

2013-03-27 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 27/03/13 21:09, Charles-François Natali wrote: > I could, but I don't have to: a shared memory won't incur any I/O or > copy (except if it is swapped). A file-backed mmap will incur a *lot* > of I/O: really, just try writting a 1GB f

[issue6653] Potential memory leak in multiprocessing

2013-03-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't think this is a bug -- processes started with fork() should nearly always be exited with _exit(). And anyway, using sys.exit() does *not* guarantee that all deallocators will be called. To be sure of cleanup at exit you could use (the undocum

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Maybe this is related to http://bugs.python.org/issue13673 which causes PyTraceback_Print() to fail if a signal is received but PyErr_CheckSignals() has not been called. Note that wrapping in "try: ... except: raise" makes a traceback appear

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. -- Added file: http://bugs.python.org/file29665/input-ctrlc.patch ___ Python tracker <http://bugs.python.

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Changes by Richard Oudkerk : Removed file: http://bugs.python.org/file29665/input-ctrlc.patch ___ Python tracker <http://bugs.python.org/issue13673> ___ ___ Python-bug

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Sorry, last message was for another issue. -- ___ Python tracker <http://bugs.python.org/issue13673> ___ ___ Python-bugs-list m

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Adding PyErr_CheckSignals() after PyOS_Readline() in builtin_input() seems to fix the problem. -- keywords: +patch Added file: http://bugs.python.org/file29666/input-ctrlc.patch ___ Python tracker <h

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Richard - are you in a position to commit / push? Done. -- ___ Python tracker <http://bugs.python.org/issue17619> ___ _

[issue17619] MS WINDOWS: input() swallows KeyboardInterrupt in Python 3.3

2013-04-03 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17634] Win32: shutil.copy leaks file handles to child processes

2013-04-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn). As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3. You only get inheritable fds on

[issue16895] Batch file to mimic 'make' on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: You seem to end your subroutines (or whatever they are called) using "goto end" rather than "exit /b". Since popd follows the "end" label, does this mean that you get a popd after calling each subroutine? Is this intended and

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't see how this is a subprocess problem, or could be fixed in subprocess. IIUC, SetConsoleTextAttribute() only has an effect if the output is connected to a console. But that is not the case if you redirect the output to a pipe (which is presu

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 07/04/2013 7:21pm, R. David Murray wrote: > Certainly on unix if you write ANSI color codes to stdout and the reader > doesn't strip them, they will be preserved and can be redisplayed, so > being able to do something similar on Windows

[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 07/04/2013 9:02pm, Caitlin Potter wrote: > I'm not entirely positive that it would be doable, but looking at the > subprocess code, it looks like we do have an open handle to the windows > stdout buffer, including buffer attributes, so it shou

[issue17674] All examples for concurrent.futures fail with "BrokenProcessPool"

2013-04-09 Thread Richard Oudkerk
Richard Oudkerk added the comment: @gjwebber: How exactly are you running the program to get that traceback? The following lines make it look like you are doing something non-standard (as opposed to just saving the file and running it from the command line): File "", li

[issue17684] Skip tests in test_socket like testFDPassSeparate on OS X

2013-04-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 10/04/2013 6:32am, Charles-François Natali wrote: > Richard, IIRC, you said somewhere that FD passing failures on OS X > could be made to work by passing a FD at a time, or something like > that. What do you think of those faiilures? I think se

[issue17643] Expose weakref callback for introspection purposes.

2013-04-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I could mark the new test as cpython only, or add a gc.collect (but I'm > not sure if the latter is enough, either). test.support.gc_collect() should work on non-refcounted implementations. --

[issue10438] list an example for calling static methods from WITHIN classes

2013-04-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: Note that in Python 3 you can also do __class__.f() in a staticmethod. Not sure if that is encouraged though. -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue10

[issue17555] ForkAwareThreadLock leak after fork

2013-04-17 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- title: Creating new processes after importing multiprocessing.managers consumes more and more memory -> ForkAwareThreadLock leak after fork versions: +Python 3.3, Python 3.4 ___ Python tracker <http://bugs.pyth

[issue17555] ForkAwareThreadLock leak after fork

2013-04-17 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-04-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: Pickling an exception (assuming it works) does not capture the traceback. Doing so would be difficult/impossible since the traceback refers to a linked list of frames, and each frame has references to lots of other stuff like the code object, the global

[issue17778] Fix test discovery for test_multiprocessing.py

2013-04-19 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue17778> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: Would this mean that the destructor could be run more than once (or prematurely)? -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue17

[issue17821] Different division results with / and // operators with large numbers

2013-04-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: In Python 3 "/" gives float division, whereas in Python 2 it is integer division, the same as "//". -- nosy: +sbt ___ Python tracker <http://bug

[issue17821] Different division results with / and // operators with large numbers

2013-04-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: Just to clarify, if you use float division then you get rounding errors. 309657313492949847071 is a rounding error: >>> x = 284397269195572115652769428988866694680//17 >>> x - int(float(x)) 3096

[issue17821] Different division results with / and // operators with large numbers

2013-04-23 Thread Richard Oudkerk
Richard Oudkerk added the comment: Yes. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17836] multiprocessing exceptions with useful traceback

2013-04-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: Duplicate of #13831. -- resolution: -> duplicate ___ Python tracker <http://bugs.python.org/issue17836> ___ ___ Python-

[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-04-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: It might be possible to come up with a hack so that when the exception is unpickled in the main process it gets a secondary exception chained to it using __cause__ or __context__ whose stringification contains the stringification of the original traceback

[issue17836] multiprocessing exceptions with useful traceback

2013-04-25 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/issue17836> ___ ___ Pyth

[issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows

2013-04-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: Some sort of error is expected. On Windows any functions or classes used in a task sent the executor must be picklable/unpicklable. This means that they must be defined in an importable module rather than being defined in the interactive shell. On Unix

[issue17874] ProcessPoolExecutor in interactive shell doesn't work in Windows

2013-05-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Ah. Then, a documentation error. The error message ("queue.Full"?) and > the documentation are totally not clear about that. Once something goes wrong you are likely to get a cascade of errors, and the first one reported is not necessar

[issue17805] No such class: multiprocessing.pool.AsyncResult

2013-05-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: It might be simplest to make the implementation match the docs by making AsyncResult an alias for ApplyResult. -- ___ Python tracker <http://bugs.python.org/issue17

[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-05-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Attached is a patch for 3.4 which uses the __cause__ hack to embed the remote traceback in the local traceback. It will not work for 2.x though. >>> import multiprocessing, subprocess >>> with multiprocessing.Pool() as p: p.apply(su

[issue15528] Better support for finalization with weakrefs

2013-05-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Here is an updated patch. It is only really the example in the docs which is different, plus a note about daemon threads. Antoine, do think this is ready to be committed? -- Added file: http://bugs.python.org/file30140/finalize.patch

[issue15528] Better support for finalization with weakrefs

2013-05-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: The only (non-doc, non-comment) changes were the two one-liners you suggested in msg172077. So I will commit. -- ___ Python tracker <http://bugs.python.org/issue15

[issue17910] Usage error in multiprocessing documentation

2013-05-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't see any difference in meaning: http://idioms.thefreedictionary.com/as+far+as+possible -- nosy: +sbt ___ Python tracker <http://bugs.python.org/is

[issue15528] Better support for finalization with weakrefs

2013-05-05 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

<    2   3   4   5   6   7   8   >