summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2023-02-02 23:50:35 (GMT)
committerGitHub <noreply@github.com>2023-02-02 23:50:35 (GMT)
commit0ca67e6313c11263ecaef7ce182308eeb5aa6814 (patch)
treeff302df77417456ee4dcf94082b6d942e320b13a /Lib/test/test_re.py
parent618b7a8260bb40290d6551f24885931077309590 (diff)
downloadcpython-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_re.py')
-rw-r--r--Lib/test/test_re.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 11628a2..eacb1a7 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -2431,7 +2431,8 @@ class ReTests(unittest.TestCase):
input_js = '''a(function() {
///////////////////////////////////////////////////////////////////
});'''
- p = multiprocessing.Process(target=pattern.sub, args=('', input_js))
+ mp = multiprocessing.get_context('spawn')
+ p = mp.Process(target=pattern.sub, args=('', input_js))
p.start()
p.join(SHORT_TIMEOUT)
try: