[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: -sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___ ___ Python-bugs-list mailing

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: -sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list mailing

[issue19112] tests of _TestProcess are not run by the multiprocessing test suite

2013-09-28 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19112 ___ ___ Python-bugs-list mailing

[issue19021] AttributeError in Popen.__del__

2013-09-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: The clearing of modules at shutdown has been substantially changed in 3.4. Now a best effort is made to let the module go away purely by gc. Those modules which survive get purged in random order. In 3.3 all modules were purged, but builtins was special

[issue19077] More robust TemporaryDirectory cleanup

2013-09-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: An alternative would be to use weakref.finalize() which would guarantee that cleanup happens before any purging occurs. That would allow the use of shutil: class TemporaryDirectory(object): def __init__(self, suffix=, prefix=template, dir=None

[issue19047] Assorted weakref docs improvements

2013-09-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for the doc cleanup -- I am rather busy right now. Note that stuff does still get replaced by None at shutdown, and this can still produce errors, even if they are much harder to trigger. If I run the following program import _weakref import

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-17 Thread Richard Oudkerk
Richard Oudkerk added the comment: An alternative would be to have separate files NEWS-3.2, NEWS-3.3, NEWS-3.4 etc. If a fix is added to 3.2 and will be merged to 3.3 and 3.4 then you add an entry to NEWS-3.2 and append some sort of tags to indicate merges: - Issue #1234: Fix something

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: I'll review the patch. (According to http://www.python.org/dev/peps/pep-0429/ feature freeze is expected in late November, so there is not too much of rush.) -- ___ Python tracker rep...@bugs.python.org http

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: By context I did not really mean a context manager. I just meant an object (possibly a singleton or module) which implements the same interface as multiprocessing. (However, it may be a good idea to also make it a context manager whose __enter__() method

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: There are lots of things that behave differently depending on the currently set start method: Lock(), Semaphore(), Queue(), Value(), ... It is not just when creating a Process or Pool that you need to know the start method. Passing a context or start_method

[issue18986] Add a case-insensitive case-preserving dict

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: With the current patch __repr__() will fail if the untransformed key is unhashable: d = collections.transformdict(id) L = [1,2,3] d[L] = None d.keys() Traceback (most recent call last): File stdin, line 1, in module File C:\Repos\cpython-dirty\lib

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: With your patch, I think if you call get_start_method() without later calling set_start_method() then the helper process(es) will never be started. With the current code, popen.Popen() automatically starts the helper processes if they have not already been

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: In my patched version, the private popen.get_start_method gets a kwarg set_if_needed=True. popen.Popen calls that as before, so its behavior should not change, while the public get_start_method sets the kwarg to False. My mistake

[issue16853] add a Selector to the select module

2013-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 05/09/2013 9:28am, Charles-François Natali wrote: As a side note, in the general case, there's more than a performance optimization: the problem with unregister() + register() vs a real modify (e.g. EPOLL_CTL_MOD) is that it's subject to a race condition

[issue18934] multiprocessing: use selectors module

2013-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: LGTM. But I would move import selectors in multiprocessing.connection to just before the definition of wait() for Unix. It is not needed on Windows and unnecessary imports slow down start up of new processes

[issue18934] multiprocessing: use selectors module

2013-09-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: I remember wondering at one time why EPOLLNVAL did not exist, and realizing that closed fds are just silently unregistered by epoll(). I guess the issue is that some of the selectors indicate a bad fd on registration, and others do it when polled

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

2013-08-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: I've seen test_multiprocessing_forkserver giving warnings too, while running the whole test suite, but can't reproduce them while running it alone. The warnings seems quite similar though, so a single fix might resolve the problem with all the tests

[issue18865] multiprocessing: remove util.pipe()?

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: Yes I will remove it. I was planning on doing so when PEP 446 was implemented. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18865

[issue18786] test_multiprocessing_spawn crashes under PowerLinux

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: The PPC64 buildbot is still failing intermittently. -- resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18786

[issue18865] multiprocessing: remove util.pipe()?

2013-08-28 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18865

[issue18786] test_multiprocessing_spawn crashes under PowerLinux

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: It looks like the main process keeps getting killed by SIGUSR1. Don't know why. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18786

[issue18786] test_multiprocessing_spawn crashes under PowerLinux

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: If the _killer process takes too long to start, it won't send SIGUSR1 before the p process returns... Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18786

[issue18786] test_multiprocessing_spawn crashes under PowerLinux

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: It should be fixed now so I will close. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18786

[issue18868] Python3 unbuffered stdin

2013-08-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: Try using Popen(..., bufsize=0). -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18868

[issue18762] error in test_multiprocessing_forkserver

2013-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Hopefully this is fixed now. -- resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18762

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 21/08/2013 3:46pm, Charles-François Natali wrote: Another, probably cleaner way would be to finally add the atfork() module (issue #16500), and register this reseed hook (which could then be implemented in ssl.py). Wouldn't that still suffer from

[issue18793] occasional test_multiprocessing_forkserver failure on FreeBSD 10.0

2013-08-21 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18793

[issue17560] problem using multiprocessing with really big objects?

2013-08-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: I could submit the part that makes it possible to customize the picklers of multiprocessing.pool.Pool instance to the standard library if people are interested. 2.7 and 3.3 are in bugfix mode now, so they will not change. In 3.3 you can do from

[issue18782] sqlite3 row factory and multiprocessing map

2013-08-19 Thread Richard Oudkerk
Richard Oudkerk added the comment: Adding the line features[0][0] to the end of main() produces a segfault for me on Linux. The FAQ for sqlite3 says that Under Unix, you should not carry an open SQLite database across a fork() system call into the child process. Problems

[issue18643] implement socketpair() on Windows

2013-08-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: Do you mean you want to use a pure python implementation on Unix? Then you would have to deal with AF_UNIX (which is the default family for socketpair() currently). A pure python implementation which deals with AF_UNIX would have to temporarily create

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

2013-08-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: Good for me. This is a very nice addition! Thanks. I do see a couple of failed assertions on Windows which presumably happen in a child process because they do not cause a failure: Assertion failed: !collecting, file ..\Modules\gcmodule.c, line 1617

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

2013-08-13 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file31282/4fc7c72b1c5d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713

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

2013-08-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: I have added documentation now so I think it is ready to merge (except for a change to Makefile). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713

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

2013-08-10 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file31214/c7aa0005f231.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713

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

2013-08-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: The forkserver process is now started using _posixsubprocess.fork_exec(). This should fix the order dependent problem mentioned before. Also the forkserver tests are now reenabled on OSX. -- ___ Python tracker

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

2013-08-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: Richard, can you say what failed on the OS X 10.4 (Tiger) buildbot? There seems to be a problem which depends on the order in which you run the test, and it happens on Linux also. For example if I do ./python -m test -v

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

2013-08-07 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: Added file: http://bugs.python.org/file31186/b3620777f54c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713

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

2013-08-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: I have done quite a bit of refactoring and added some extra tests. When I try using the forkserver start method on the OSX Tiger buildbot (the only OSX one available) I get errors. I have disabled the tests for OSX, but it seemed to be working before

[issue18676] Queue: document that zero is accepted as timeout value

2013-08-07 Thread Richard Oudkerk
Richard Oudkerk added the comment: IMHO it just doesn't make sense passing 0.0 as a timeout value. I have written lots of code that looks like timeout = max(deadline - time.time(), 0) some_function(..., timeout=timeout) This makes perfect sense. Working code should not be broken

[issue18649] list2cmdline function in subprocess module handles \ sequence wrong

2013-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: Firstly, list2cmdline() takes a list as its argument, not a string: import subprocess print subprocess.list2cmdline([r'\1|2\']) \\\1|2\\\ But the problem with passing arguments to a batch file is that cmd.exe parses arguments differently from how

[issue18649] list2cmdline function in subprocess module handles \ sequence wrong

2013-08-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think you're missing the point. The implementation is wrong as it does not do what documentation says which is A double quotation mark preceded by a backslash is interpreted as a literal double quotation mark. That docstring describes how the string

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 01/08/2013 10:59am, Antoine Pitrou wrote: If you replace the end of your script with the following: for name, mod in sys.modules.items(): if name != 'encodings': mod.__dict__[__blob__] = Blob(name) del name, mod, Blob then at the end

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: You might want to open a prompt and look at gc.get_referrers() for encodings.mbcs.__dict__ (or another of those modules). gc.get_referrers(sys.modules['encodings.mbcs'].__dict__) [module 'encodings.mbcs' from 'C:\\Repos\\cpython-dirty\\lib\\encodings

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: I get different numbers from you. If I run ./python -v -c pass, most modules in the wiping phase are C extension modules, which is expected. Pretty much every pure Python module ends up garbage collected before that. The *module* gets gc'ed, sure

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: Also, do note that purge/gc after wiping can still be a regular gc pass unless the module has been wiped. The gc could be triggered by another module being wiped. For me, the modules which die naturally after purging begins are # purge/gc encodings.aliases

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-08-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: Yes, I agree the patch is ok. It would be would be much simpler to keep track of the module dicts if they were weakrefable. Alternatively, at shutdown a weakrefable object with a reference to the module dict could be inserted in to each module dict. We

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-07-31 Thread Richard Oudkerk
Richard Oudkerk added the comment: I played a bit with the patch and -v -Xshowrefcount. The number of references and blocks left at exit varies (and is higher than for unpatched python). It appears that a few (1-3) module dicts are not being purged because they have been orphaned. (i.e

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

2013-07-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: The spawn branch is in decent shape, although the documentation is not up-to-date. I would like to commit before the first alpha. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713

[issue18078] threading.Condition to allow notify on a specific waiter

2013-07-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: IMHO 1) It should check all predicates. 2) It should return a list of ready conditions. 3) It should *not* accept a list of conditions. 4) from_condition() should be removed. Also notify() should try again if releasing a waiter raises RuntimeError because

[issue17778] Fix test discovery for test_multiprocessing.py

2013-07-16 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for the patches! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17778

[issue18344] _bufferedreader_read_all() may leak reference to data

2013-07-15 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18344 ___ ___ Python-bugs

[issue18344] _bufferedreader_read_all() may leak reference to data

2013-07-15 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18344

[issue18455] Multiprocessing connection SocketClient retries connection on socket

2013-07-15 Thread Richard Oudkerk
Richard Oudkerk added the comment: Thanks for the report. This should be fixed now in 2.7. (3.1 and 3.2 only get security fixes.) -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18455] Multiprocessing connection SocketClient retries connection on socket

2013-07-14 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18455 ___ ___ Python-bugs-list mailing

[issue4708] os.pipe should return inheritable descriptors (Windows)

2013-07-09 Thread Richard Oudkerk
Richard Oudkerk added the comment: - would improve POSIX compatibility, it mimics what os.pipe() does on those OS I disagree. On Windows fds can only be inherited if you start processes using the spanwn*() family of functions. If you start them using CreateProcess() then the underlying

[issue4708] os.pipe should return inheritable descriptors (Windows)

2013-07-09 Thread Richard Oudkerk
Richard Oudkerk added the comment: Oops. I confused os.popen() with os.spawn*(). os.spawnv() IS still implemented using spawnv() in Python 3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4708

[issue18382] multiprocessing's overlapped PipeConnection issues on Windows 8

2013-07-06 Thread Richard Oudkerk
Richard Oudkerk added the comment: Does that test always fail? -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18382 ___ ___ Python

[issue6642] returning after forking a child thread doesn't call Py_Finalize

2013-07-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Shouldn't the child process be terminating using os._exit()? -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6642

[issue18329] for line in socket.makefile() speed degradation

2013-07-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think I know what's going on here. For socket IO readline() uses a readahead buffer size of 1. Why is that? I think that makefile(mode='rb') and fdopen() both create BufferedReader objects with the same buffer size. It looks to me like

[issue18329] for line in socket.makefile() speed degradation

2013-07-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: Using while True: if not fileobj.read(8192): break instead of for line in fileobj: pass results in higher throughput, but a similar slowdown with makefile(). So this is not a problem specific

[issue18329] for line in socket.makefile() speed degradation

2013-07-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: The only real reason for implementing SocketIO in pure Python is because read() and write() do not work on Windows with sockets. (I think there are also a few complications involving SSL sockets and the close() method.) On Windows I have implemented a file

[issue18329] for line in socket.makefile() speed degradation

2013-07-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: Ah. I had not thought of socket timeouts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18329

[issue18329] for line in socket.makefile() speed degradation

2013-07-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: I find that by adding the lines fileobj.raw.readinto = ss.recv_into fileobj.raw.read = ss.recv the speed with makefile() is about 30% slower than with fdopen(). -- ___ Python tracker rep

[issue7292] Multiprocessing Joinable race condition?

2013-07-03 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - works for me stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7292

[issue18344] _bufferedreader_read_all() may leak reference to data

2013-07-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file30748/buf-readall.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18344

[issue17273] Pool methods can only be used by parent process.

2013-07-02 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed title: multiprocessing.pool.Pool task/worker handlers are not fork safe - Pool methods can only be used by parent process. type: behavior - versions: +Python 2.7

[issue14206] multiprocessing.Queue documentation is lacking important details

2013-07-02 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14206 ___ ___ Python-bugs

[issue14206] multiprocessing.Queue documentation is lacking important details

2013-07-02 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14206

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

2013-07-02 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17261

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2013-07-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Reopening because I think this is again a problem for Win64 and 3.x. The Win64 buildbots always seem to crash on test_marshal (and I do too). It appears to be BugsTestCase.test_loads_2x_code() which crashes, which is virtually the same

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2013-07-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Closing because this is caused by #17206 and is already discussed there. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2286

[issue17097] multiprocessing BaseManager serve_client() does not check EINTR on recv

2013-07-01 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17097

[issue18331] runpy.run_path gives functions with corrupted .__globals__

2013-06-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: When modules are garbage collected the associated globals dict is purged -- see #18214. This means that all values (except __builtins__) are replaced by None. To work around this run_path() apparently returns a *copy* of the globals dict which was created

[issue18332] _posix_listdir may leak FD

2013-06-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think this is a duplicate of #17899. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18332

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think in Python 3 makefile() returns a TextIOWrapper object by default. To force the use of binary you need to specfiy the mode: fileobj = ss.makefile(mode='rb') -- nosy: +sbt ___ Python tracker rep

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: I did this to use the same abstraction that was used extensively for other purposes, instead of recreating the same abstraction with a deque as its basis. So you wanted a FIFO queue and preferred the API of Queue to that of deque? Well it will be *much

[issue7292] Multiprocessing Joinable race condition?

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: unfinished_tasks is simply used as a counter. It is only accessed while holding self._cond. If you get this error then I think the error text is correct -- your progam calls task_done() to many times. The proposed patch silences the sanity check by making

[issue15818] multiprocessing documentation of Process.exitcode

2013-06-24 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15818

[issue17621] Create a lazy import loader mixin

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: I was thinking about the line self.__dict__.update(state) overwriting new data with stale data. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17621

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: 1. but should not cause any pratical difficulties -- you have a typo in 'pratical' there. 2. What exactly do you mean by managed queues in the new addition? Woops. Fixed now see 860fc6a2bd21, 347647a1f798. A managed queue is one created like

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- assignee: - docs@python components: +Documentation -IO, Interpreter Core nosy: +docs@python resolution: - fixed stage: - committed/rejected status: open - closed type: behavior - ___ Python

[issue17985] multiprocessing Queue.qsize() and Queue.empty() with different results

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: This is really a documentation issue. The doc fix for #18277 covers this. -- components: +Library (Lib) -Extension Modules resolution: - wont fix stage: - committed/rejected status: open - closed type: - behavior

[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Apologies for being dense, but how would you actually use such a loader? Would you need to install something in sys.meta_path/sys.path_hooks? Would it make all imports lazy or only imports of specified modules? -- nosy: +sbt

[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Shouldn't the import lock be held to make it threadsafe? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17621

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: This is a very similar issue to #17985. While it may seem counter-intuitive, I don't see how it makes any difference. Another thread/process might remove the item before you can get it. I find it very difficult to imagine a real program where you can safely

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: Why would you use a multi-process queue to pass messages from one part of the program to another part, in the same process and thread? Why not just use a deque? Is this something you actually did, or are you just trying to come up with a plausible example

[issue16507] Patch selectmodule.c to support WSAPoll on Windows

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- keywords: +gsoc -patch resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16507

[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: We don't do non-security updates on Python 2.6 anymore. As a workaround you might be able to do something like import sys, multiprocessing sys.frozen = True# or multiprocessing.forking.WINEXE = True ... if __name__ == '__main__

[issue6461] multiprocessing: freezing apps on Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: I just tried freezing the program from multiprocessing import freeze_support,Manager if __name__ == '__main__': freeze_support() m=Manager() l = m.list([1,2,3]) l.append(4) print(l) print(repr(l)) using cx_Freeze

[issue17018] Inconsistent behaviour of methods waiting for child process

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17018

[issue18122] RuntimeError: not holding the import lock

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: See also #9573 and #15914. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18122 ___ ___ Python-bugs-list

[issue15198] multiprocessing Pipe send of non-picklable objects doesn't raise error

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15198

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think if you use timeit then the code is wrapped inside a function before it is compiled. This means that your code can mostly use faster local lookups rather than global lookups. -- nosy: +sbt ___ Python

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- stage: committed/rejected - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18252 ___ ___ Python

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18252 ___ ___ Python

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-15 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18214 ___ ___ Python-bugs-list

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-15 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 15/06/2013 7:11pm, Antoine Pitrou wrote: Usually garbage collection will end up clearing the module's dict anyway. This is not true, since global objects might have a __del__ and then hold the whole module dict alive through a reference cycle. Happily

[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-14 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9122 ___ ___ Python-bugs-list mailing

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-14 Thread Richard Oudkerk
New submission from Richard Oudkerk: Currently when a module is garbage collected its dict is purged by replacing all values except __builtins__ by None. This helps clear things at shutdown. But this can cause problems if it occurs *before* shutdown: if we use a function defined in a module

[issue18212] No way to check whether Future is finished?

2013-06-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: Do you want something like f.done() and not f.cancelled() and f.exception() is None -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18212

<    1   2   3   4   5   6   7   8   >