summaryrefslogtreecommitdiffstats
path: root/Lib/test/_test_multiprocessing.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-25066: Added repr for multiprocessing.Event (GH-29749)Kumar Aditya2021-12-091-1/+14
| | | Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-45125: Improves pickling docs and tests for `shared_memory` (GH-28294)Nikita Sobolev2021-10-011-31/+104
|
* bpo-45310: Fix parrallel shared memory tests (GH-28661)Serhiy Storchaka2021-10-011-16/+24
| | | | | | Add a PID to names of POSIX shared memory objects to allow running multiprocessing tests (test_multiprocessing_fork, test_multiprocessing_spawn, etc) in parallel.
* bpo-45209: fix `UserWarning: resource_tracker` in test_multiprocessing ↵Nikita Sobolev2021-09-211-0/+7
| | | | (GH-28377)
* bpo-45052: Unskips a failing `test_shared_memory_basics` test (GH-28182)Nikita Sobolev2021-09-061-2/+0
|
* bpo-45042: Now test classes decorated with `requires_hashdigest` are not ↵Nikita Sobolev2021-09-041-0/+1
| | | | | | skipped (GH-28060) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)Serhiy Storchaka2021-08-291-0/+5
|
* bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341)finefoot2021-07-021-0/+10
| | | | Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
* bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)Inada Naoki2021-04-041-5/+5
| | | | | | | | | | | | | | | | | | | * test_asyncio * test_bz2 * test_math * test_cmath * test_cmd_line * test_cmd_line_script * test_compile * test_contextlib * test_profile * ctypes/test/test_find * test_multiprocessing * test_configparser * test_csv * test_dbm_dumb * test_decimal * test_difflib * os.fdopen() calls io.text_encoding() to emit EncodingWarning for right place.
* bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556)Vinay Sharma2020-08-301-0/+12
|
* bpo-41521: Rename blacklist parameter to not_exported (GH-21824)Victor Stinner2020-08-171-2/+4
| | | | Rename "blacklist" parameter of test.support.check__all__() to "not_exported".
* bpo-40275: Use new test.support helper submodules in tests (GH-21764)Hai Shi2020-08-071-15/+17
|
* bpo-38169: Increase code coverage for SharedMemory and ShareableList (GH-16139)Vinay Sharma2020-07-191-0/+29
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21169)Hai Shi2020-06-301-1/+2
|
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-201-1/+1
|
* bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944)Victor Stinner2020-06-181-1/+1
| | | | | | On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module.
* bpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412)Christian Heimes2020-06-041-0/+10
| | | | | Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-2/+3
|
* bpo-39244: multiprocessing return default start method first on macOS (GH-18625)idomic2020-05-261-1/+3
|
* bpo-40135: Fix multiprocessing test_shared_memory_across_processes() (GH-19892)Hai Shi2020-05-041-1/+3
| | | | Don't define shared memory block's name in test_shared_memory_across_processes(): use SharedMemory(create=True) instead.
* bpo-30966: Add multiprocessing.SimpleQueue.close() (GH-19735)Victor Stinner2020-04-271-0/+14
| | | | | | Add a new close() method to multiprocessing.SimpleQueue to explicitly close the queue. Automerge-Triggered-By: @pitrou
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-4/+5
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-39983: Add test.support.print_warning() (GH-19683)Victor Stinner2020-04-231-19/+13
| | | | | | | Log "Warning -- ..." test warnings into sys.__stderr__ rather than sys.stderr, to ensure to display them even if sys.stderr is captured. test.libregrtest.utils.print_warning() now calls test.support.print_warning().
* bpo-40330: Fix utf-8 size check in ShareableList (GH-19606)Antoine Pitrou2020-04-201-2/+14
| | | | | The item size must be checked after encoding to bytes, not before. Automerge-Triggered-By: @pitrou
* bpo-40094: Add test.support.wait_process() (GH-19254)Victor Stinner2020-03-311-1/+1
| | | | | | | | | Moreover, the following tests now check the child process exit code: * test_os.PtyTests * test_mailbox.test_lock_conflict() * test_tempfile.test_process_awareness() * test_uuid.testIssue8621() * multiprocessing resource tracker tests
* bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool ↵Batuhan Taşkaya2020-03-151-0/+18
| | | | | | | | | (GH-19009) When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads. This commit moves the notification to the _terminate_pool function so is called from both code paths. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)Pablo Galindo2020-03-091-0/+13
|
* bpo-35727: Use exit code 0 on sys.exit() in multiprocessing.Process. (GH-11538)Christopher Hunt2020-02-211-6/+15
|
* bpo-38546: multiprocessing tests stop the resource tracker (GH-17641)Victor Stinner2019-12-171-10/+1
| | | | | | | | | | Multiprocessing and concurrent.futures tests now stop the resource tracker process when tests complete. Add ResourceTracker._stop() method to multiprocessing.resource_tracker. Add _cleanup_tests() helper function to multiprocessing.util: share code between multiprocessing and concurrent.futures tests.
* bpo-38614: Use support timeout constants (GH-17572)HEADmasterVictor Stinner2019-12-111-4/+3
|
* bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566)Victor Stinner2019-12-111-1/+1
| | | | | | | | | | | | | | | Replace hardcoded timeout constants in tests with SHORT_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once. SHORT_TIMEOUT is 30 seconds by default, but it can be longer depending on --timeout command line option. The change makes almost all timeouts longer, except test_reap_children() of test_support which is made 2x shorter: SHORT_TIMEOUT should be enough. If this test starts to fail, LONG_TIMEOUT should be used instead. Uniformize also "from test import support" import in some test files.
* bpo-38614: Use test.support.LONG_TIMEOUT constant (GH-17562)Victor Stinner2019-12-101-2/+2
| | | | | | | | Replace hardcoded timeout constants in tests with LONG_TIMEOUT of test.support, so it's easier to ajdust this timeout for all tests at once. LONG_TIMEOUT is 5 minutes by default, but it can be longer depending on --timeout command line option.
* bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)Jake Tesler2019-11-191-0/+22
| | | | | | | | | | | | | | | | | | | This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou
* bpo-38614: Add timeout constants to test.support (GH-16964)Victor Stinner2019-10-301-12/+6
| | | | | | | | Add timeout constants to test.support: * LOOPBACK_TIMEOUT * INTERNET_TIMEOUT * SHORT_TIMEOUT * LONG_TIMEOUT
* bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)Victor Stinner2019-09-241-5/+6
| | | | | | | | Multiprocessing test test_mymanager() now also expects -SIGTERM, not only exitcode 0. bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the manager process if it takes longer than 1 second to stop, which happens on slow buildbots.
* bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)Victor Stinner2019-09-241-2/+1
| | | | Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds.
* bpo-38018: Fix test for multiprocessing.shared_memory in BSD systems (GH-15821)Vinay Sharma2019-09-101-2/+7
|
* bpo-38018: Increase code coverage for multiprocessing.shared_memory (GH-15662)Vinay Sharma2019-09-091-0/+24
|
* bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)Jakub Kulík2019-07-111-1/+1
| | | | | | With the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. The reason seems to be incorrect name handling which results in two slashes being prepended. https://bugs.python.org/issue37558
* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)Victor Stinner2019-07-051-0/+6
| | | | | multiprocessing tests now stop the ForkServer instance if it's running: close the "alive" file descriptor to ask the server to stop and then remove its UNIX address.
* bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)Victor Stinner2019-07-021-0/+3
| | | | | multiprocessing tests now call explicitly _run_finalizers() to remove immediately temporary directories created by multiprocessing.util.get_temp_dir().
* bpo-37244: Fix test_multiprocessing.test_resource_tracker() (GH-14288)Pierre Glaser2019-06-251-6/+15
| | | Increase robustness of test_resource_tracker(): retry for 60 seconds.
* bpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)Pierre Glaser2019-06-251-3/+3
|
* bpo-36888: Add multiprocessing.parent_process() (GH-13247)Thomas Moreau2019-05-201-0/+59
|
* bpo-36867: _test_multiprocessing: avoid weak sync primitive (GH-13292)Pierre Glaser2019-05-171-4/+12
| | | Avoid weak sync primitive in multiprocessing resource_tracker test.
* bpo-36867: Create the resource_tracker before launching SharedMemoryManagers ↵Pierre Glaser2019-05-131-14/+44
| | | | (GH-13276)
* bpo-36867: Make semaphore_tracker track other system resources (GH-13222)Pierre Glaser2019-05-101-54/+116
| | | The multiprocessing.resource_tracker replaces the multiprocessing.semaphore_tracker module. Other than semaphores, resource_tracker also tracks shared_memory segments. Patch by Pierre Glaser.
* bpo-36368: Ignore SIGINT in SharedMemoryManager servers. (GH-12483)Pierre Glaser2019-05-101-0/+24
| | | | Fix a bug crashing SharedMemoryManager instances in interactive sessions after a Ctrl-C (KeyboardInterrupt) was sent.
* bpo-36668: FIX reuse semaphore tracker for child processes (#5172)Thomas Moreau2019-04-241-0/+28
| | | Fix the multiprocessing.semaphore_tracker so it is reused by child processes.
* bpo-35934: Add socket.create_server() utility function (GH-11784)Giampaolo Rodola2019-04-081-6/+2
|