Commit Graph

171 Commits

Author SHA1 Message Date
Davin Potts e895de3e7f
bpo-35813: Tests and docs for shared_memory (#11816)
* Added tests for shared_memory submodule.

* Added tests for ShareableList.

* Fix bug in allocationn size during creation of empty ShareableList illuminated by existing test run on Linux.

* Initial set of docs for shared_memory module.

* Added docs for ShareableList, added doctree entry for shared_memory submodule, name refactoring for greater clarity.

* Added examples to SharedMemoryManager docs, for ease of documentation switched away from exclusively registered functions to some explicit methods on SharedMemoryManager.

* Wording tweaks to docs.

* Fix test failures on Windows.

* Added tests around SharedMemoryManager.

* Documentation tweaks.

* Fix inappropriate test on Windows.

* Further documentation tweaks.

* Fix bare exception.

* Removed __copyright__.

* Fixed typo in doc, removed comment.

* Updated SharedMemoryManager preliminary tests to reflect change of not supporting all registered functions on SyncManager.

* Added Sphinx doctest run controls.

* CloseHandle should be in a finally block in case MapViewOfFile fails.

* Missed opportunity to use with statement.

* Switch to self.addCleanup to spare long try/finally blocks and save one indentation, change to use decorator to skip test instead.

* Simplify the posixshmem extension module.

Provide shm_open() and shm_unlink() functions.  Move other
functionality into the shared_memory.py module.

* Added to doc around size parameter of SharedMemory.

* Changed PosixSharedMemory.size to use os.fstat.

* Change SharedMemory.buf to a read-only property as well as NamedSharedMemory.size.

* Marked as provisional per PEP411 in docstring.

* Changed SharedMemoryTracker to be private.

* Removed registered Proxy Objects from SharedMemoryManager.

* Removed shareable_wrap().

* Removed shareable_wrap() and dangling references to it.

* For consistency added __reduce__ to key classes.

* Fix for potential race condition on Windows for O_CREX.

* Remove unused imports.

* Update access to kernel32 on Windows per feedback from eryksun.

* Moved kernel32 calls to _winapi.

* Removed ShareableList.copy as redundant.

* Changes to _winapi use from eryksun feedback.

* Adopt simpler SharedMemory API, collapsing PosixSharedMemory and WindowsNamedSharedMemory into one.

* Fix missing docstring on class, add test for ignoring size when attaching.

* Moved SharedMemoryManager to managers module, tweak to fragile test.

* Tweak to exception in OpenFileMapping suggested by eryksun.

* Mark a few dangling bits as private as suggested by Giampaolo.
2019-02-23 22:08:16 -06:00
Rémi Lapeyre a31f4cc881 bpo-35918: Remove broken has_key method and add test (#11819) 2019-02-11 16:37:24 -08:00
Pablo Galindo 3766f18c52
bpo-35378: Fix multiprocessing.Pool references (GH-11627)
Changes in this commit:

1. Use a _strong_ reference between the Pool and associated iterators
2. Rework PR #8450 to eliminate a cycle in the Pool.

There is no test in this commit because any test that automatically tests this behaviour needs to eliminate the pool before joining the pool to check that the pool object is garbaged collected/does not hang. But doing this will potentially leak threads and processes (see https://bugs.python.org/issue35413).
2019-02-11 17:29:00 +00:00
Pablo Galindo 7b2a37b728
Make sure the BaseManager in test_multiprocessing is cleaned up correctly (GH-11653) 2019-02-09 17:35:05 +00:00
Pablo Galindo 613f729e5d
Do not retain references to processes and managers in TestSyncManagerTypes (GH-11801)
Keeping references to processes and managers between tests makes them count as dangling processes.
2019-02-09 17:08:49 +00:00
Giampaolo Rodola 2848d9d299 bpo-35917: Test multiprocessing manager classes and shareable types (GH-11772)
multiprocessing: provide unittests for manager classes and shareable types
2019-02-07 11:03:11 +00:00
Victor Stinner 9a8d1d7562
bpo-35424: emit ResourceWarning at multiprocessing.Pool destruction (GH-10974)
multiprocessing.Pool destructor now emits ResourceWarning
if the pool is still running.
2018-12-20 20:33:51 +01:00
Victor Stinner 2cf4c202ff
bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)
Replace time.time() with time.monotonic() in tests to measure time
delta.

test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
2018-12-17 09:36:36 +01:00
Victor Stinner 08c2ba0717
bpo-35477: multiprocessing.Pool.__enter__() fails if called twice (GH-11134)
multiprocessing.Pool.__enter__() now fails if the pool is not
running: "with pool:" fails if used more than once.
2018-12-13 02:15:30 +01:00
Victor Stinner 388c8c208d
bpo-35424: test_multiprocessing: join 3 pools (GH-10986)
Join 3 pools in these tests:

* test.test_multiprocessing_spawn.WithProcessesTestPool.test_context
* test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback
2018-12-06 11:56:52 +01:00
Victor Stinner 9dfc754d61
Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450)" (GH-10971)
This reverts commit 97bfe8d3eb.
2018-12-06 08:51:47 +01:00
Victor Stinner b7278736b3
bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)
Fix WithThreadsTestPool.test_wrapped_exception()
of test_multiprocessing_fork: join the pool.

WithThreadsTestPool.test_del_pool() is now also decorated
with @support.reap_threads.
2018-11-28 01:14:31 +01:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) 70f61b933f bpo-35202: Remove unused imports in Lib directory (GH-10450) 2018-11-15 21:59:19 +09:00
Julien Palard 5d236cafd7
bpo-19675: Terminate processes if construction of a pool is failing. (GH-5614) 2018-11-04 23:40:32 +01:00
Zackery Spytz 0461704060 bpo-22872: multiprocessing.Queue's put() and get() now raise ValueError if the queue is closed. (GH-9010)
Previously, put() and get() would raise AssertionError and OSError,
respectively.
2018-10-13 12:26:09 +03:00
Pablo Galindo 3058b7d856
bpo-33613: Fix test_semaphore_tracker signal tests when using -Werror (GH-9778)
Tests involving sending signals to the semaphore_tracker will not fail anymore due to
the fact that running the test suite with -Werror propagates warnings as errors.

Fix a missing assertion when the semaphore_tracker is expected to die.
2018-10-10 08:40:14 +01:00
tzickel 97bfe8d3eb bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450)
Fix a reference issue inside multiprocessing.Pool that caused the pool to remain alive if it was deleted without being closed or terminated explicitly.
2018-10-02 23:01:23 +02:00
Zackery Spytz eef059657d bpo-31370: Remove references to threadless builds (#8805)
Support for threadless builds was removed in a6a4dc81.
2018-09-29 10:07:11 -06:00
Serhiy Storchaka e0e5065dae
bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113) 2018-09-17 14:24:01 +03:00
Pablo Galindo ec74d187f5 bpo-33613, test_semaphore_tracker_sigint: fix race condition (#7850)
Fail `test_semaphore_tracker_sigint` if no warnings are expected and one is received.

Fix race condition when the child receives SIGINT before it can register signal handlers for it.

The race condition occurs when the parent calls
`_semaphore_tracker.ensure_running()` (which in turn spawns the
semaphore_tracker using `_posixsubprocess.fork_exec`), the child
registers the signal handlers and the parent tries to kill the child.
What seem to happen is that in some slow systems, the parent sends the
signal to kill the child before the child protects against the signal.
2018-09-04 10:53:54 +02:00
Victor Stinner 5640d030e1 bpo-30317: Fix multiprocessing test_timeout() (GH-8621)
Multiprocessing test_timeout() now accepts a delta of 100 ms instead
of just 50 ms, since the test failed with 135.8 ms instead of the
expected 200 ms.
2018-08-03 01:09:00 +01:00
Derek B. Kim c40278ef95 Simplify __all__ in multiprocessing (GH-6856) 2018-07-11 19:22:28 +09:00
Victor Stinner 07888e1cce
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
Fix test_forkserver_sigkill() of test_multiprocessing_forkserver:
give more time to the first child process to complete, double the
sleep in the parent process.

Reduce also the child process sleep from 1000 ms to 500 ms, to not change
the total duration of the test.
2018-07-04 11:49:41 +02:00
Victor Stinner 23401fb960
bpo-33735: Fix test_multiprocessing random failure (GH-8059)
When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()
2018-07-03 13:20:35 +02:00
Victor Stinner 492572715a
bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)
Increase timeouts from 10 seconds to 1 minute.
2018-06-27 22:24:02 +02:00
Victor Stinner fbd7172325
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
test_mymanager_context() now also accepts -SIGTERM as an expected
exitcode for the manager process. The process is killed with SIGTERM
if it takes longer than 1 second to stop.
2018-06-27 18:18:10 +02:00
Victor Stinner f15f66d275
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
Tolerate a different of 50 ms, instead of just 30 ms, in
test_timeout() of multiprocessing tests. This change should fix such
test failure on Windows:

FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue)
Traceback (most recent call last):
  File "lib\test\_test_multiprocessing.py", line 753, in test_timeout
    self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16138982772827148 not greater than or equal to 0.17
2018-06-27 11:04:51 +02:00
Victor Stinner 937ee9e745
Revert "bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)" (GH-7919)
This reverts commit 8fbbdf0c31.
2018-06-26 02:11:06 +02:00
Victor Stinner 8fbbdf0c31
bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)
* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell
2018-06-22 19:25:44 +02:00
Victor Stinner 252f6abe0a
bpo-33532: Fix test_multiprocessing_forkserver.test_ignore() (GH-7319)
Use also support.SOCK_MAX_SIZE, not only support.PIPE_MAX_SIZE, to
get the size for a blocking send into a multiprocessing pipe.
2018-06-01 16:48:34 +02:00
Victor Stinner 5d6c7ed5e3
bpo-33532: Fix multiprocessing test_ignore() (#7262)
Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.
2018-05-31 05:08:42 +02:00
Ville Skyttä 61f82e0e33 Spelling fixes to docs, docstrings, and comments (GH-6374) 2018-04-20 16:08:45 -04:00
Antoine Pitrou e4679cd644
bpo-32759: Free unused arenas in multiprocessing.heap (GH-5827)
Large shared arrays allocated using multiprocessing would remain allocated
until the process ends.
2018-04-09 17:37:55 +02:00
Thomas Moreau dec1c7786f FIX failure on OSX sem_getvalue (#6180) 2018-03-21 18:56:27 +01:00
Thomas Moreau e2f33add63 bpo-33078 - Fix queue size on pickling error (GH-6119) 2018-03-21 16:50:28 +01:00
Antoine Pitrou e756f66c83
bpo-31804: Fix multiprocessing.Process with broken standard streams (#6079)
In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows).  Avoid failing with a non-0 exit code in those conditions.

Report and initial patch by poxthegreat.
2018-03-11 19:21:38 +01:00
Christian Heimes b6e43af669
bpo-28134: Auto-detect socket values from file descriptor (#1349)
Fix socket(fileno=fd) by auto-detecting the socket's family, type,
and proto from the file descriptor. The auto-detection can be overruled
by passing in family, type, and proto explicitly.

Without the fix, all socket except for TCP/IP over IPv4 are basically broken:

>>> s = socket.create_connection(('www.python.org', 443))
>>> s
<socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)>
>>> socket.socket(fileno=s.fileno())
<socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)>

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-29 22:37:58 +01:00
Thomas Moreau 94459fd7dc bpo-31699 Deadlocks in `concurrent.futures.ProcessPoolExecutor` with pickling error (#3895)
Fix deadlocks in :class:`concurrent.futures.ProcessPoolExecutor` when task arguments or results cause pickling or unpickling errors.
This should make sure that calls to the :class:`ProcessPoolExecutor` API always eventually return.
2018-01-05 11:15:54 +01:00
Victor Stinner 9402c8367b
bpo-32294: Fix multiprocessing test_semaphore_tracker() (#4885)
Run the child process with -E option to ignore the PYTHONWARNINGS
environment variable.
2017-12-15 16:29:24 +01:00
Mike 53f7a7c281 bpo-32297: Few misspellings found in Python source code comments. (#4803)
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
2017-12-14 13:04:53 +02:00
Victor Stinner 8c663fd60e
Replace KB unit with KiB (#4293)
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.

Same change for MB and GB which become MiB and GiB.

Change the output of Tools/iobench/iobench.py.

Round also the size of the documentation from 5.5 MB to 5 MiB.
2017-11-08 14:44:44 -08:00
Antoine Pitrou cbe1756e3e
bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed (#3247)
* bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed

* Avoid mucking with process state in test.
Add a warning if the semaphore process died, as semaphores may then be leaked.

* Add NEWS entry
2017-11-03 14:31:38 +01:00
Antoine Pitrou fc6b348b12
bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary (#3246)
* bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary.

* Fix test on Windows

* Add NEWS entry

* Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker.

* Fix comment

* Make sure the test doesn't muck with process state

* Also test previously-started processes

* Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst

* Avoid masking SIGTERM in forkserver.  It's not necessary and causes a race condition in test_many_processes.
2017-11-03 13:34:22 +01:00
Antoine Pitrou daeefd2e04 bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (#4073) 2017-10-22 11:40:31 +02:00
Victor Stinner e6cfdefa0c bpo-31510: Fix multiprocessing test_many_processes() on macOS (#3857)
On macOS, a process can exit with -SIGKILL if it is killed "early"
with SIGTERM.
2017-10-02 08:27:34 -07:00
Victor Stinner 11f0807a40 bpo-31234: test_multiprocessing: wait 30 seconds (#3599)
Give 30 seconds to join_process(), instead of 5 or 10 seconds, to
wait until the process completes.
2017-09-15 06:55:31 -07:00
Victor Stinner b9b69003d9 bpo-31234: Add support.join_thread() helper (#3587)
join_thread() joins a thread but raises an AssertionError if the
thread is still alive after timeout seconds.
2017-09-14 14:40:56 -07:00
Antoine Pitrou ee84a60858 bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit (#3111)
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit

* Add NEWS blurb
2017-08-16 20:53:28 +02:00
Victor Stinner 17657bb945 bpo-31069, test_multiprocessing: Fix dangling process (#3103)
Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.
2017-08-16 12:46:04 +02:00
Victor Stinner 957d0e9b59 bpo-26762: _test_multiprocessing reports dangling (#3064)
_test_multiprocessing now marks the test as ENV_CHANGED on dangling
process or thread.
2017-08-10 17:36:50 +02:00
Victor Stinner b4c52966c8 bpo-26762: test_multiprocessing close more queues (#2855)
* Close explicitly queues to make sure that we don't leave dangling
  threads
* test_queue_in_process(): remove unused queue
* test_access() joins also the process to fix a random warning
2017-07-25 02:40:55 +02:00
Victor Stinner ffb49408f0 test_multiprocessing detects dangling per test case (#2841)
bpo-26762: test_multiprocessing now detects dangling processes and
threads per test case classes:

* setUpClass()/tearDownClass() of mixin classes now check if
  multiprocessing.process._dangling or threading._dangling was
  modified to detect "dangling" processses and threads.
* ManagerMixin.tearDownClass() now also emits a warning if it still
  has more than one active child process after 5 seconds.
* tearDownModule() now checks for dangling processes and threads
  before sleep 500 ms. And it now only sleeps if there is a least one
  dangling process or thread.
2017-07-25 01:55:54 +02:00
Victor Stinner d7e64d9934 test_multiprocessing: Fix dangling process/thread (#2850)
bpo-26762: Fix more dangling processes and threads in
test_multiprocessing:

* Queue: call close() followed by join_thread()
* Process: call join() or self.addCleanup(p.join)
2017-07-25 00:33:56 +02:00
Victor Stinner 06634950c5 bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)
test_level() of _test_multiprocessing._TestLogging now uses regular
processes rather than daemon processes to prevent zombi processes
(to not "leak" processes).
2017-07-24 13:02:20 +02:00
Antoine Pitrou 896145d9d2 bpo-26732: fix too many fds in processes started with the "forkserver" method (#2813)
* bpo-26732: fix too many fds in processes started with the "forkserver" method

A child process would inherit as many fds as the number of still-running children.

* Add blurb and test comment
2017-07-22 13:22:54 +02:00
Antoine Pitrou ff92ff5366 Fix test failure without ctypes (#2802) 2017-07-21 13:24:05 +02:00
Gareth Rees 3913bad495 bpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741)
* bpo-19896: Add typcodes 'q' and 'Q' to multiprocessing.sharedctypes. Patch by Antony Lee.

* Add NEWS entry.

* Slightly tweak NEWS entry

Make it clear this is more of a fix rather than a new feature.
2017-07-21 12:35:33 +02:00
Vitor Pereira ba75af7130 bpo-30794: added kill() method to multiprocessing.Process (#2528)
* bpo-30794: added kill() method to multiprocessing.Process

* Added entries to documentation and NEWS

* Refactored test_terminate and test_kill

* Fix SIGTERM and SIGKILL being used on Windows for the tests

* Added "versionadded" marker to the documentation

* Fix trailing whitespace in doc
2017-07-18 17:34:23 +02:00
Antoine Pitrou 48350412b7 bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)
* bpo-29293: multiprocessing.Condition.notify() lacks parameter `n`

* Add NEWS blurb
2017-07-04 08:59:22 +02:00
Antoine Pitrou 79d37ae979 Clear potential ref cycle between Process and Process target (#2470)
* Clear potential ref cycle between Process and Process target

Besides Process.join() not being called, this was an indirect cause of bpo-30775.
The threading module already does this.

* Add issue reference
2017-06-28 12:29:08 +02:00
Antoine Pitrou a79f8faccf bpo-30775: Fix refleaks in test_multiprocessing (#2467)
Forgetting to call Process.join() can keep some resources alive.
2017-06-28 11:21:52 +02:00
Antoine Pitrou 13e96cc596 Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)
* Fix bpo-30596: Add close() method to multiprocessing.Process

* Raise ValueError if close() is called before the Process is finished running

* Add docs

* Add NEWS blurb
2017-06-24 19:22:23 +02:00
Victor Stinner 8f6eeaf21c bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (#2148)
_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.
2017-06-13 23:48:47 +02:00
Antoine Pitrou 1eb6c0074d bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
* bpo-24484: Avoid race condition in multiprocessing cleanup

The finalizer registry can be mutated while inspected by multiprocessing
at process exit.

* Use test.support.start_threads()

* Add Misc/NEWS
2017-06-13 17:10:39 +02:00
Antoine Pitrou dfd5f34634 Fix bpo-30589: improve Process.exitcode with forkserver (#1989)
* Fix bpo-30589: improve Process.exitcode with forkserver

When the child is killed, Process.exitcode should return -signum, not 255.

* Add Misc/NEWS
2017-06-12 15:28:19 +02:00
grzgrzgrz3 bc50f03db4 bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (#1683)
* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
2017-05-25 16:22:57 +02:00
Xiang Zhang 6f75bc003a bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)
Under  *spawn* and *forkserver* start methods, SimpleQueue.empty() could
raise AttributeError due to not setting _poll in __setstate__.
2017-05-17 21:04:00 +08:00
Antoine Pitrou 685cdb9acc Relax test timing (bpo-29861) to avoid sporadic failures (#1120) 2017-04-14 13:10:00 +02:00
Xiang Zhang 794623bdb2 bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-693)
an exception raised at the very first of an iterable would cause pools behave abnormally
(swallow the exception or hang)
2017-03-29 11:58:54 +08:00
Antoine Pitrou 8988945cdc bpo-29861: release references to multiprocessing Pool tasks (#743)
* bpo-29861: release references to multiprocessing Pool tasks

Release references to tasks, their arguments and their results as soon
as they are finished, instead of keeping them alive until another task
arrives.

* Comments in test
2017-03-24 13:52:11 +01:00
Antoine Pitrou ebb39bcc04 Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks. 2016-12-10 17:16:17 +01:00
Antoine Pitrou cd2a201e5b Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks. 2016-12-10 17:13:16 +01:00
Martin Panter 0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
R David Murray 44b548dda8 #27364: fix "incorrect" uses of escape character in the stdlib.
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04:00
Davin Potts 86a7668426 Fixes issue #6766: Updated multiprocessing Proxy Objects to support nesting 2016-09-07 18:48:01 -05:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Victor Stinner a6d865c128 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
Antoine Pitrou 58f2bd86fb Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested. 2016-03-15 10:52:51 +01:00
Antoine Pitrou 62b6a0d70c Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested. 2016-03-15 10:48:28 +01:00
Charles-François Natali 78f55ffc63 Issue #23992: multiprocessing: make MapResult not fail-fast upon exception. 2016-02-10 22:58:18 +00:00
Berker Peksag 076dbd0560 Fix remaining tests and remove an unused import. 2015-05-06 07:01:52 +03:00
Serhiy Storchaka 84de1bf281 Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.
Patch by Davin Potts.
2015-04-23 11:36:40 +03:00
Serhiy Storchaka 71f73ca7a9 Issue #23713: Fixed fragility of test_imap_unordered_handle_iterable_exception.
Patch by Davin Potts.
2015-04-23 11:35:59 +03:00
Serhiy Storchaka 63623ac252 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:30:33 +02:00
Serhiy Storchaka 79fbeee237 Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
Potts.
2015-03-13 08:25:26 +02:00
Serhiy Storchaka eef20de744 Issue #22853: Added regression test for using multiprocessing.Queue at import
time.  Patch by Davin Potts.
2015-03-06 23:33:51 +02:00
Serhiy Storchaka f8904e99c7 Issue #22853: Added regression test for using multiprocessing.Queue at import
time.  Patch by Davin Potts.
2015-03-06 23:32:54 +02:00
Serhiy Storchaka 2eab85b7a2 Issue #21849: Ported from 2.7 tests for non-ASCII data. 2015-02-13 15:19:08 +02:00
Serhiy Storchaka a25c542c47 Issue #21849: Ported from 2.7 tests for non-ASCII data. 2015-02-13 15:13:33 +02:00
Victor Stinner f92766c3b2 (Merge 3.4) test_multiprocessing: tolerate a delta of 30 ms because of bad
clock resolution on Windows
2015-02-05 14:25:53 +01:00
Victor Stinner aad7b2e4f5 test_multiprocessing: tolerate a delta of 30 ms because of bad clock resolution
on Windows
2015-02-05 14:25:05 +01:00
Charles-François Natali 6e20460dc6 Issue #21566: Make use of socket.listen() default backlog. 2014-07-23 19:28:13 +01:00
Richard Oudkerk 80a5be1d84 Issue #20980: Stop wrapping exception when using ThreadPool. 2014-03-23 12:30:54 +00:00
Richard Oudkerk 42a526c60f Issue #20114: Double timeout in test_semaphore_tracker() to reduce
chance of sporadic failures.
2014-02-21 22:29:58 +00:00
Serhiy Storchaka ab0ac27d24 Issue #20315: Removed support for backward compatibility with early 2.x versions.
Removed backward compatibility alias curses.window.nooutrefresh which should
be removed in 2.3.
2014-01-20 21:35:06 +02:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00
Richard Oudkerk 35e4ad71ba Merge. 2013-11-17 17:47:00 +00:00
Richard Oudkerk 69cce482cb Merge. 2013-11-17 17:30:54 +00:00
Richard Oudkerk af630c5885 Merge. 2013-11-02 16:47:08 +00:00