Commit Graph

293 Commits

Author SHA1 Message Date
Richard Oudkerk 5b8a3242c4 Merge 2013-02-26 13:00:15 +00:00
Richard Oudkerk 7aaa1ef858 Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR. 2013-02-26 12:39:57 +00:00
Giampaolo Rodola' 67da89446a fix for previous commit related to issue 10527 which didn't have the intended effect as per http://bugs.python.org/issue10527#msg179895 2013-01-14 02:24:25 +01:00
Giampaolo Rodola' 0c8ad61c95 fix for previous commit related to issue 10527 which didn't have the intended effect as per http://bugs.python.org/issue10527#msg179895 2013-01-14 02:24:05 +01:00
Richard Oudkerk 0ee84e04da Issue #16955: Fix the poll() method for multiprocessing's socket
connections on Windows.
2013-01-13 22:52:13 +00:00
Richard Oudkerk ed9e06cb21 Issue #16955: Fix the poll() method for multiprocessing's socket
connections on Windows.
2013-01-13 22:46:48 +00:00
Richard Oudkerk ef45380b6b Fix overlooked licence text. 2013-01-01 14:25:59 +00:00
Giampaolo Rodola' b4f39e85f2 Fix issue 10527: make multiprocessing use poll() instead of select() if available. 2012-12-31 17:38:46 +01:00
Giampaolo Rodola' 5051ca887c Fix issue 10527: make multiprocessing use poll() instead of select() if available. 2012-12-31 17:38:17 +01:00
Giampaolo Rodola' 5e844c8052 Fix issue 10527: make multiprocessing use poll() instead of select() if available. 2012-12-31 17:23:09 +01:00
Andrew Svetlov f7a17b48d7 Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
Andrew Svetlov 2606a6f197 Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
2012-12-19 14:33:35 +02:00
Andrew Svetlov ad28c7f9da Issue #16706: get rid of os.error 2012-12-18 22:02:39 +02:00
Andrew Svetlov a191959849 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:27:16 +02:00
Andrew Svetlov 5b89840d9c Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:26:36 +02:00
Andrew Svetlov 737fb89dd1 Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
2012-12-18 21:14:22 +02:00
Richard Oudkerk 8f7c4b8a85 Issue #16481: Merge 2012-11-15 18:22:23 +00:00
Richard Oudkerk 021f4c2ecc Issue #16481: multiprocessing no longer leaks process handles on Windows. 2012-11-15 18:16:35 +00:00
Andrew Svetlov 6b973747f3 Issue #16284: Prevent keeping unnecessary references to worker functions in concurrent.futures ThreadPoolExecutor. 2012-11-03 15:36:01 +02:00
Hynek Schlawack 969684f2ad Merge 3.3 2012-10-27 12:56:30 +02:00
Hynek Schlawack 254af2644a #16307: Fix multiprocessing.Pool.map_async not calling its callbacks
Patch by Janne Karila.
2012-10-27 12:53:02 +02:00
Richard Oudkerk 5046e9741c Make __mp_main__ an alias for __main__ in all processes to simplify
pickling of classes defined in main module.
2012-10-08 13:07:00 +01:00
Benjamin Peterson 3095f4724e raise a ValueError instead of an AssertionError when pool is an invalid state 2012-09-25 12:45:42 -04:00
Richard Oudkerk e8cd6bb127 Issue #15881: Clarify comment in exit function 2012-09-13 17:27:15 +01:00
Alexander Belopolsky 5bedef3e64 Issue #15881: Fixed 3.2 backport. 2012-09-09 13:31:08 -04:00
Alexander Belopolsky 7f704c11db Fixed whitespace 2012-09-09 13:25:06 -04:00
Alexander Belopolsky 36351564a2 Fixed whitespace 2012-09-09 13:22:45 -04:00
Alexander Belopolsky f36c49d124 Issue #15881: Fixed atexit hook in multiprocessing. 2012-09-09 13:20:58 -04:00
Alexander Belopolsky 59fb38b582 Issue #15881: Fixed atexit hook in multiprocessing. 2012-09-09 13:16:15 -04:00
Richard Oudkerk 04ec8ce1bb Issue #14669: Fix pickling of connections and sockets on MacOSX
by sending/receiving an acknowledgment after file descriptor transfer.
TestPicklingConnection has been reenabled for MacOSX.
2012-08-16 16:48:55 +01:00
Richard Oudkerk 3165a75e45 Merge 3.2 2012-08-14 12:51:14 +01:00
Richard Oudkerk e88a2445bc Issue #15646: Prevent equivalent of a fork bomb when using multiprocessing
on Windows without the "if __name__ == '__main__'" idiom.
2012-08-14 11:41:32 +01:00
Richard Oudkerk b303580c7c Issue #15525: Increase timeout when TerminateProcess() fails 2012-08-01 17:44:18 +01:00
Richard Oudkerk b15e622bb8 Issue #6056: Make multiprocessing use setblocking(True) on the sockets it uses.
Original patch by J Derek Wilson.
2012-07-27 14:19:00 +01:00
Richard Oudkerk 4887b1c0e7 Issue #6056: Make multiprocessing use setblocking(True) on the sockets it uses.
Original patch by J Derek Wilson.
2012-07-27 14:06:11 +01:00
Richard Oudkerk 8838061119 Issue #10527: Remove dead code 2013-01-15 13:19:24 +00:00
Giampaolo Rodola' 549d465fe2 issue 10527: fix missing import 2013-01-03 02:54:27 +01:00
Richard Oudkerk ac38571f00 Issue #15064: Make BaseManager.__enter__() start server if necessary. 2012-06-18 21:29:30 +01:00
Richard Oudkerk d69cfe88ea Issue #15064: Implement context manager protocol for multiprocessing types 2012-06-18 17:47:52 +01:00
Richard Oudkerk 0f884273b0 Issue #15101: Make pool finalizer avoid joining current thread. 2012-06-18 16:02:49 +01:00
Richard Oudkerk f29ec4b0c8 Issue #15101: Make pool finalizer avoid joining current thread. 2012-06-18 15:54:57 +01:00
Richard Oudkerk 3049f1243e Increase timeout used when waiting for manager to shutdown cleanly
before resorting to terminate()
2012-06-15 20:08:29 +01:00
Richard Oudkerk 3730a17a58 Issue #14059: Implement multiprocessing.Barrier 2012-06-15 18:26:07 +01:00
Richard Oudkerk 73d9a292ae Issue #13841: Make child processes exit using sys.exit() on Windows 2012-06-14 15:30:10 +01:00
Richard Oudkerk f0604fddc3 Issue #3518: Remove references to non-existent BaseManager.from_address()
method
2012-06-11 17:56:08 +01:00
Richard Oudkerk 58ba47f97b Merge fixes for #13854 and #12157. 2012-06-07 20:38:11 +01:00
Richard Oudkerk 29471de459 Issue #13854: Properly handle non-integer, non-string arg to SystemExit
Previously multiprocessing only expected int or str.  It also wrongly
used an exit code of 1 when the argument was a string instead of zero.
2012-06-06 19:04:57 +01:00
Richard Oudkerk e41682b994 Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
2012-06-06 19:04:57 +01:00
Richard Oudkerk bd7b5dd816 Prevent handle leak if CreateProcess() fails in multiprocessing 2012-06-04 18:59:10 +01:00
Richard Oudkerk 86eb7e97ae Fix potential NameError in multiprocessing.Condition.wait() 2012-06-04 18:59:07 +01:00
Richard Oudkerk ad06444d6c Make Finalize reserve a reference to os.getpid in case called at shutdown 2012-06-04 18:58:59 +01:00
Richard Oudkerk 87ea780e8e Use Python 3.x-style keyword only arg in Array()
Previously a Python 2.x compatible hack was used for
multiprocessing.sharedctypes.Array().  Also the documented
signature was wrong.
2012-05-29 12:01:47 +01:00
Richard Oudkerk 1074a9294b Remove __getslice__, __setslice__, __delslice__ methods from proxies
Proxy classes in multiprocessing do not need these methods in Python 3.x.
2012-05-29 12:01:45 +01:00
Richard Oudkerk 26cdf1fe5b Make multiprocessing's shared memory use memoryview instead of raw pointer 2012-05-26 22:09:59 +01:00
Richard Oudkerk 739ae5692e Issue #14548: Make multiprocessing finalizers check pid before running
This protects from possibilty of gc running just after fork.
2012-05-25 13:54:53 +01:00
Richard Oudkerk 692130a231 Issue #12091: simplify ApplyResult and MapResult with threading.Event
Patch by Charles-François Natali
2012-05-25 13:26:53 +01:00
Richard Oudkerk be39cfc9dc Merge 2012-05-25 13:04:20 +01:00
Richard Oudkerk 54454e7dc2 Issue #14881: Allow normal non-main thread to spawn a dummy process
Fix suggested by Itay Brandes
2012-05-25 12:57:58 +01:00
Antoine Pitrou fa67aa0d72 Fix whitespace 2012-05-18 18:33:32 +02:00
Antoine Pitrou ebdcd859e5 Move private function _args_from_interpreter_flags() to subprocess.py, so
that it can be imported when threads are disabled.
(followup to issue #12098)
2012-05-18 18:33:07 +02:00
Richard Oudkerk 77c84f2def #12098: Make multiprocessing's child processes inherit sys.flags on Windows
Initial patch by Sergey Mezentsev.
2012-05-18 14:28:02 +01:00
Richard Oudkerk 59d5404bc7 Issue #14753: Make multiprocessing treat negative timeouts as it did in 3.2
In Python 3.2 and earlier, Process.join() and Connection.poll()
treated negative timeouts as zero timeouts.  Earlier versions from
the 3.3 line of development treat them as infinite timeouts.

The patch reverts to the old behaviour.
2012-05-10 16:11:12 +01:00
Richard Oudkerk 41eb85b194 Make AcquirerProxy.acquire() support timeout argument 2012-05-06 16:45:02 +01:00
Richard Oudkerk 7ef909cdd7 Fix for issue 14725 for 3.2 branch 2012-05-05 20:41:23 +01:00
Richard Oudkerk fdb8dcf675 Fix for Issue 14725 for 3.3 branch. 2012-05-05 19:45:37 +01:00
Richard Oudkerk a6becaa9cb Fix dangling warning for test_multiprocessing 2012-05-03 18:29:02 +01:00
Richard Oudkerk 3e268aac3b Mark multiprocessing files with "Licensed to PSF under a Contributor Agreement"
instead of BSD licence.
2012-04-30 12:13:55 +01:00
Antoine Pitrou 92ff4e196b Issue #14666: stop multiprocessing's resource-sharing thread after the tests are done.
Also, block delivery of signals to that thread. Patch by Richard Oudkerk.

This will hopefully fix sporadic freezes on the FreeBSD 9.0 buildbot.
2012-04-27 23:51:03 +02:00
Antoine Pitrou 5438ed1572 Issue #4892: multiprocessing Connections can now be transferred over multiprocessing Connections.
Patch by Richard Oudkerk (sbt).
2012-04-24 22:56:57 +02:00
Antoine Pitrou 23bba4ca39 Issue #11750: The Windows API functions scattered in the _subprocess and
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
2012-04-18 20:51:15 +02:00
Charles-François Natali c8ce715a82 Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. 2012-04-17 18:45:57 +02:00
Antoine Pitrou df97cbe7a1 Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
Patch by sbt.
2012-04-07 22:38:52 +02:00
Antoine Pitrou 5c73e8eaf4 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:13:45 +02:00
Antoine Pitrou 6d20cba8d6 Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under
Windows.  Patch by Popa Claudiu.
2012-04-03 20:12:23 +02:00
Antoine Pitrou 93bba8fb8a Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:25:49 +02:00
Antoine Pitrou 709176f10c Issue #14151: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_PIPE type address under
non-Windows platforms.  Patch by Popa Claudiu.
2012-04-01 17:19:09 +02:00
Antoine Pitrou 846fd302a0 Issue #14335: multiprocessing's custom Pickler subclass now inherits from the C-accelerated implementation.
Patch by sbt.
2012-03-17 00:23:04 +01:00
Antoine Pitrou bdb1cf1ca5 Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
for polling multiple objects at once.  Patch by sbt.

Complete changelist from sbt's patch:

* Adds a wait(rlist, timeout=None) function for polling multiple
  objects at once.  On Unix this is just a wrapper for
  select(rlist, [], [], timeout=None).

* Removes use of the SentinelReady exception and the sentinels argument
  to certain methods.  concurrent.futures.process has been changed to
  use wait() instead of SentinelReady.

* Fixes bugs concerning PipeConnection.poll() and messages of zero
  length.

* Fixes PipeListener.accept() to call ConnectNamedPipe() with
  overlapped=True.

* Fixes Queue.empty() and SimpleQueue.empty() so that they are
  threadsafe on Windows.

* Now PipeConnection.poll() and wait() will not modify the pipe except
  possibly by consuming a zero length message.  (Previously poll()
  could consume a partial message.)

* All of multiprocesing's pipe related blocking functions/methods are
  now interruptible by SIGINT on Windows.
2012-03-05 19:28:37 +01:00
Sandro Tosi cd77815e4c Issue #11836: document and expose multiprocessing.SimpleQueue 2012-02-15 23:27:00 +01:00
Charles-François Natali ed4a8fc095 Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on Connection
sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to make sure two
listeners can't bind to the same socket/pipe (or any existing socket/pipe).
2012-02-08 21:15:58 +01:00
Charles-François Natali edc67feaa4 Issue #8184: Fix a potential file descriptor leak when a
multiprocessing.Connection socket can't be bound.
2012-02-04 15:12:08 +01:00
Charles-François Natali 992ca5278e Issue #8184: Fix a potential file descriptor leak when a
multiprocessing.Connection socket can't be bound.
2012-02-04 14:55:53 +01:00
Antoine Pitrou 2d843d2520 Issue #13812: When a multiprocessing Process child raises an exception, flush stderr after printing the exception traceback. 2012-01-27 10:53:35 +01:00
Antoine Pitrou 84a0fbf6b0 Issue #13812: When a multiprocessing Process child raises an exception, flush stderr after printing the exception traceback. 2012-01-27 10:52:37 +01:00
Charles-François Natali fe8039b3e5 Issue #13565: Increase multiprocessing's server socket backlog, to avoid
dropped connections in case of simultaneous connection requests.
2011-12-23 19:06:48 +01:00
Charles-François Natali 78c1b42fde Issue #13565: Increase multiprocessing's server socket backlog, to avoid
dropped connections in case of simultaneous connection requests.
2011-12-23 19:07:58 +01:00
Antoine Pitrou de911b2915 Issue #12708: Add starmap() and starmap_async() methods (similar to itertools.starmap()) to multiprocessing.Pool.
Patch by Hynek Schlawack.
2011-12-21 11:03:24 +01:00
Victor Stinner 8a20851010 Issue #25654:
* multiprocessing: open file with closefd=False to avoid ResourceWarning
* _test_multiprocessing: open file with O_EXCL to detect bugs in tests (if a
  previous test forgot to remove TESTFN)
* test_sys_exit(): remove TESTFN after each loop iteration

Initial patch written by Serhiy Storchaka.
2016-03-25 09:29:50 +01:00
Charles-François Natali e6eabd4345 Issue #13215: multiprocessing.Connection: don't hammer the remote end with
retries in case of ECONNREFUSED.
2011-11-19 09:59:43 +01:00
Florent Xicluna 04842a84c3 Remove unused or redundant imports in concurrent.futures and multiprocessing. 2011-11-11 20:05:50 +01:00
Antoine Pitrou 021572431b Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
when called with a timeout.  Patch by Arnaud Ysmal.
2011-11-10 00:38:25 +01:00
Antoine Pitrou a365113679 Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
when called with a timeout.  Patch by Arnaud Ysmal.
2011-11-10 00:37:09 +01:00
Florent Xicluna 5d1155c08e Closes #13258: Use callable() built-in in the standard library. 2011-10-28 14:45:05 +02:00
Charles-François Natali f8859e1808 Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
2011-10-24 18:45:29 +02:00
Ezio Melotti e130a52d8a Remove duplication. 2011-10-19 10:58:56 +03:00
Florent Xicluna aabbda5354 Merge 3.2 2011-10-28 14:52:29 +02:00
Charles-François Natali feeb3a366c Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
2011-10-24 18:47:43 +02:00
Antoine Pitrou 24d659daaf Use InterruptedError instead of checking for EINTR 2011-10-23 23:49:42 +02:00
Ezio Melotti f10644983e Merge with 3.2. 2011-10-19 11:06:26 +03:00
Antoine Pitrou 6b4883dec0 PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy. 2011-10-12 02:54:14 +02:00
Charles-François Natali dc863ddf79 Issue #12981: rewrite multiprocessing_{sendfd,recvfd} in Python. 2011-09-24 20:04:29 +02:00
Charles-François Natali 225aa4f8ec Issue #12996: multiprocessing.connection: transmit the header in network byte
order (endpoints machines can have different endianness).
2011-09-20 19:27:39 +02:00
Éric Araujo 0cdd4454f3 Remove indirection in threading (issue #10968).
The public names (Thread, Condition, etc.) used to be factory functions
returning instances of hidden classes (_Thread, _Condition, etc.),
because (if Guido recalls correctly) this code pre-dates the ability to
subclass extension types.

It is now possible to inherit from Thread and other classes, without
having to import the private underscored names like multiprocessing did.

A doc update will follow: a patch is under discussion on the issue.
2011-07-28 00:28:28 +02:00
Antoine Pitrou fb96089b13 Fix test_multiprocessing failure under Windows.
(followup to dfaa3a149a92)
2011-07-20 02:01:39 +02:00
Antoine Pitrou dc19c24832 Silence spurious "broken pipe" tracebacks when shutting down a ProcessPoolExecutor. 2011-07-16 01:51:58 +02:00
Antoine Pitrou 428bc6c48f Issue #12573: Add resource checks for dangling Thread and Process objects. 2011-07-15 22:15:38 +02:00
Antoine Pitrou c081c0c6a0 Issue #12573: Add resource checks for dangling Thread and Process objects. 2011-07-15 22:12:24 +02:00
Antoine Pitrou 600012028e Add comment 2011-07-09 01:03:46 +02:00
Antoine Pitrou 71a28a9174 Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
2011-07-09 01:03:00 +02:00
Charles-François Natali 723585bbaf Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:43:11 +02:00
Charles-François Natali a4a04069fd Merge issue #12352: Fix a deadlock in multiprocessing.Heap when a block is
freed by the garbage collector while the Heap lock is held.
2011-07-02 14:39:53 +02:00
Charles-François Natali 778db49da9 Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.
2011-07-02 14:35:49 +02:00
Victor Stinner 395dc58ee7 (merge 3.2) Issue #12285: multiprocessing.Pool() raises a ValueError if the
number of processes if negative or null.
2011-06-20 17:54:03 +02:00
Victor Stinner 2fae27b735 Issue #12285: multiprocessing.Pool() raises a ValueError if the number of
processes if negative or null.
2011-06-20 17:53:35 +02:00
Victor Stinner 3bcc0170bd (Merge 3.2) Issue #12310: finalize the old process after _run_after_forkers()
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.

Patch written by Charles-François Nataliv and Antoine Pitrou.
2011-06-17 12:36:26 +02:00
Victor Stinner 0f83b1511c Issue #12310: finalize the old process after _run_after_forkers()
multiprocessing: Process._bootstrap() keeps a reference to the old process to
delay its finalization until after _run_after_forkers() as been executed. This
change should fix a crash on Mac OS X Tiger when a lock is released after a
fork.

Patch written by Charles-François Nataliv and Antoine Pitrou.
2011-06-17 12:31:49 +02:00
Antoine Pitrou dd69649660 Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation.  Previously it
would reliably freeze/deadlock.
2011-06-08 17:21:55 +02:00
Antoine Pitrou 34b312e33d Whitespace normalization 2011-06-06 19:36:01 +02:00
Antoine Pitrou 176f07dadf Issue #12040: Expose a new attribute `sentinel` on instances of
:class:`multiprocessing.Process`.  Also, fix Process.join() to not use
polling anymore, when given a timeout.
2011-06-06 19:35:31 +02:00
Antoine Pitrou 5aa878c61a os.dup()-then-close() can be replaced with detach() 2011-05-09 21:00:28 +02:00
Antoine Pitrou 87cf220972 Issue #11743: Rewrite multiprocessing connection classes in pure Python. 2011-05-09 17:04:27 +02:00
brian.curtin 80e478362b Fix #5162. Allow child spawning from Windows services (via pywin32). 2011-04-11 17:59:01 -05:00
brian.curtin 727b498102 Fix #5162. Allow child spawning from Windows services (via pywin32). 2011-04-11 17:57:59 -05:00
brian.curtin e2f299845d Fix #5162. Allow child spawning from Windows services (via pywin32). 2011-04-11 17:56:23 -05:00
Antoine Pitrou 753009a657 Merge from 3.2 (issue #11814, issue #8428) 2011-04-11 00:22:08 +02:00
Antoine Pitrou bed9a5b6b3 Issue #11814: Fix likely typo in multiprocessing.Pool._terminate(). 2011-04-11 00:20:23 +02:00
Antoine Pitrou 81dee6b4d4 Issue #8428: Fix a race condition in multiprocessing.Pool when terminating
worker processes: new processes would be spawned while the pool is being
shut down.  Patch by Charles-François Natali.
2011-04-11 00:18:59 +02:00
Mark Dickinson 657bd0a25d Merge #11675 2011-03-26 10:22:56 +00:00
Mark Dickinson 633872e3fb Merge #11675 2011-03-26 10:21:20 +00:00
Mark Dickinson 89461ef8fc Issue #11675: Zero-out newly-created multiprocessing.[Raw]Array objects. 2011-03-26 10:19:03 +00:00
Ronald Oussoren f0edd1b86d Merge with 3.1 2011-03-16 09:43:06 -04:00
Ronald Oussoren 0b8753d24b Issue #11569: use absolute path to the sysctl command in multiprocessing to
ensure that it will be found regardless of the shell PATH. This ensures
that multiprocessing.cpu_count works on default installs of MacOSX.
2011-03-16 09:41:32 -04:00
Ronald Oussoren 4d5fe33a70 Merge with 3.2 2011-03-16 09:44:26 -04:00
Antoine Pitrou 0bd4deba38 Issue #6064: Add a `daemon` keyword argument to the threading.Thread
and multiprocessing.Process constructors in order to override the
default behaviour of inheriting the daemonic property from the current
thread/process.
2011-02-25 22:07:43 +00:00
Marc-André Lemburg 8f36af7a4c Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.

These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.

Also see issue11303.
2011-02-25 15:42:01 +00:00
Nick Coghlan 793ee1f8a8 Issue #10845: Improve compatibility between multiprocessing on Windows and package, zipfile and directory execution (Reviewed by Antoine Pitrou and approved by Georg Brandl) 2011-01-30 01:24:08 +00:00
Victor Stinner 2b69506c79 Issue #10816: multiprocessing.SocketClient() closes the socket on error
Use a context manager to close immediatly the socket on error.
2011-01-03 15:47:59 +00:00
R. David Murray d382066d2c Merged revisions 87225 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87225 | r.david.murray | 2010-12-13 20:38:16 -0500 (Mon, 13 Dec 2010) | 2 lines

  9162: fix license in multiprocessing files
........
2010-12-14 01:41:07 +00:00
R. David Murray 3fc969a4a2 9162: fix license in multiprocessing files 2010-12-14 01:38:16 +00:00
Ask Solem 2afcbf2249 Issue #9244: multiprocessing.pool: Worker crashes if result can't be encoded 2010-11-09 20:55:52 +00:00
Brian Curtin 9e2fadcbdd Merged revisions 86077 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86077 | brian.curtin | 2010-11-01 00:10:44 -0500 (Mon, 01 Nov 2010) | 3 lines

  Fix some ResourceErrors.
  Use a context manager for os.popen and explicitly close a socket.
........
2010-11-01 05:12:34 +00:00
Brian Curtin 50be1ca55e Fix some ResourceErrors.
Use a context manager for os.popen and explicitly close a socket.
2010-11-01 05:10:44 +00:00
Georg Brandl 2fa4cc55e9 Support new Condition return value in the multiprocessing version. 2010-10-28 13:01:06 +00:00
Antoine Pitrou 1ce3eb5c5b Issue #8990: array.fromstring() and array.tostring() get renamed to
frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects.  Patch by Thomas Jollans.
2010-09-01 20:29:34 +00:00
Brian Curtin 6aa8bc3442 Merged revisions 83722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83722 | brian.curtin | 2010-08-04 10:47:24 -0500 (Wed, 04 Aug 2010) | 7 lines

  Fix #9513 to remove relative imports from multiprocessing.

  The test suite currently skips test_multiprocessing on Windows
  because it fails on finding _multiprocessing in several
  win32-specific blocks. Removing the relative import lets this
  through and allows the test to run (and pass).
........
2010-08-04 15:54:19 +00:00
Brian Curtin a6a3274aad Fix #9513 to remove relative imports from multiprocessing.
The test suite currently skips test_multiprocessing on Windows
because it fails on finding _multiprocessing in several
win32-specific blocks. Removing the relative import lets this
through and allows the test to run (and pass).
2010-08-04 15:47:24 +00:00
Antoine Pitrou 7c3e577395 Issue #7316: the acquire() method of lock objects in the :mod:`threading`
module now takes an optional timeout argument in seconds.  Timeout support
relies on the system threading library, so as to avoid a semi-busy wait
loop.
2010-04-14 15:44:10 +00:00
Florent Xicluna 9b0e9180e2 Note: only the relevant parts of r79474 are merged.
Merged revisions 78793,78798-78799,78977,79095,79196,79474 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78793 | florent.xicluna | 2010-03-08 13:25:35 +0100 (lun, 08 mar 2010) | 2 lines

  Fix macpath to deal with bytes
................
  r78798 | florent.xicluna | 2010-03-08 14:32:17 +0100 (lun, 08 mar 2010) | 18 lines

  Merged revisions 78777,78787,78790 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78777 | florent.xicluna | 2010-03-08 00:49:03 +0100 (lun, 08 mar 2010) | 4 lines

    Backport the Popen.poll() protection from subprocess to multiprocessing. See #1731717.
    It should fix transient failures on test_multiprocessing.
  ........
    r78787 | florent.xicluna | 2010-03-08 08:21:16 +0100 (lun, 08 mar 2010) | 2 lines

    Don't fail on a debug() statement, if the worker PID is (still) None.
  ........
    r78790 | florent.xicluna | 2010-03-08 12:01:39 +0100 (lun, 08 mar 2010) | 2 lines

    On finalize, don't try to join not started process.
  ........
................
  r78799 | florent.xicluna | 2010-03-08 15:44:41 +0100 (lun, 08 mar 2010) | 2 lines

  Fix ntpath abspath to deal with bytes.
................
  r78977 | florent.xicluna | 2010-03-15 14:14:39 +0100 (lun, 15 mar 2010) | 2 lines

  Fix \xhh specs, #1889.  (an oversight of r60193, r60210).
................
  r79095 | florent.xicluna | 2010-03-19 15:40:31 +0100 (ven, 19 mar 2010) | 2 lines

  Rename test.test_support to test.support for 3.x.
................
  r79196 | florent.xicluna | 2010-03-21 13:29:50 +0100 (dim, 21 mar 2010) | 9 lines

  Merged revisions 79195 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r79195 | florent.xicluna | 2010-03-21 13:27:20 +0100 (dim, 21 mar 2010) | 2 lines

    Issue #8179: Fix macpath.realpath() on a non-existing path.
  ........
................
  r79474 | florent.xicluna | 2010-03-28 01:25:02 +0100 (dim, 28 mar 2010) | 33 lines

  Merged revisions 79297,79310,79382,79425-79427,79450 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r79297 | florent.xicluna | 2010-03-22 18:18:18 +0100 (lun, 22 mar 2010) | 2 lines

    #7668: Fix test_httpservers failure when sys.executable contains non-ASCII bytes.
  ........
    r79310 | florent.xicluna | 2010-03-22 23:52:11 +0100 (lun, 22 mar 2010) | 2 lines

    Issue #8205: Remove the "Modules" directory from sys.path when Python is running from the build directory (POSIX only).
  ........
    r79382 | florent.xicluna | 2010-03-24 20:33:25 +0100 (mer, 24 mar 2010) | 2 lines

    Skip tests which depend on multiprocessing.sharedctypes, if _ctypes is not available.
  ........
    r79425 | florent.xicluna | 2010-03-25 21:32:07 +0100 (jeu, 25 mar 2010) | 2 lines

    Syntax cleanup `== None` -> `is None`
  ........
    r79426 | florent.xicluna | 2010-03-25 21:33:49 +0100 (jeu, 25 mar 2010) | 2 lines

    #8207: Fix test_pep277 on OS X
  ........
    r79427 | florent.xicluna | 2010-03-25 21:39:10 +0100 (jeu, 25 mar 2010) | 2 lines

    Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
  ........
    r79450 | florent.xicluna | 2010-03-26 20:32:44 +0100 (ven, 26 mar 2010) | 2 lines

    Ensure that the failed or unexpected tests are sorted before printing.
  ........
................
2010-03-28 11:42:38 +00:00
Florent Xicluna 998171f0d7 Merged revisions 78777,78787,78790 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78777 | florent.xicluna | 2010-03-08 00:49:03 +0100 (lun, 08 mar 2010) | 4 lines

  Backport the Popen.poll() protection from subprocess to multiprocessing. See #1731717.
  It should fix transient failures on test_multiprocessing.
........
  r78787 | florent.xicluna | 2010-03-08 08:21:16 +0100 (lun, 08 mar 2010) | 2 lines

  Don't fail on a debug() statement, if the worker PID is (still) None.
........
  r78790 | florent.xicluna | 2010-03-08 12:01:39 +0100 (lun, 08 mar 2010) | 2 lines

  On finalize, don't try to join not started process.
........
2010-03-08 13:32:17 +00:00
Florent Xicluna b519d23c16 Missing part from r78654 2010-03-04 16:10:55 +00:00