diff options
| author | Gregory P. Smith <greg@krypto.org> | 2023-02-02 23:50:35 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-02 23:50:35 (GMT) |
| commit | 0ca67e6313c11263ecaef7ce182308eeb5aa6814 (patch) | |
| tree | ff302df77417456ee4dcf94082b6d942e320b13a /Lib/test/test_logging.py | |
| parent | 618b7a8260bb40290d6551f24885931077309590 (diff) | |
| download | cpython-0ca67e6313c11263ecaef7ce182308eeb5aa6814.zip cpython-0ca67e6313c11263ecaef7ce182308eeb5aa6814.tar.gz cpython-0ca67e6313c11263ecaef7ce182308eeb5aa6814.tar.bz2 | |
GH-84559: Deprecate fork being the multiprocessing default. (#100618)
This starts the process. Users who don't specify their own start method
and use the default on platforms where it is 'fork' will see a
DeprecationWarning upon multiprocessing.Pool() construction or upon
multiprocessing.Process.start() or concurrent.futures.ProcessPool use.
See the related issue and documentation within this change for details.
Diffstat (limited to 'Lib/test/test_logging.py')
| -rw-r--r-- | Lib/test/test_logging.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 072056d..8a12d57 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -4759,8 +4759,9 @@ class LogRecordTest(BaseTest): # In other processes, processName is correct when multiprocessing in imported, # but it is (incorrectly) defaulted to 'MainProcess' otherwise (bpo-38762). import multiprocessing - parent_conn, child_conn = multiprocessing.Pipe() - p = multiprocessing.Process( + mp = multiprocessing.get_context('spawn') + parent_conn, child_conn = mp.Pipe() + p = mp.Process( target=self._extract_logrecord_process_name, args=(2, LOG_MULTI_PROCESSING, child_conn,) ) |
