Skip to content

Commit 3995086

Browse files
committed
Add missing fork deprecation warning decorator to new tests
The new tests need @warnings_helper.ignore_fork_in_thread_deprecation_warnings() to avoid DeprecationWarning when creating Pool with the fork start method in a multi-threaded test process (Python 3.14+ strictness). <claude>
1 parent ab7fd0d commit 3995086

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/_test_multiprocessing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3071,6 +3071,7 @@ def test_make_pool(self):
30713071
p.close()
30723072
p.join()
30733073

3074+
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
30743075
def test_change_notifier_no_semaphore(self):
30753076
# gh-134634: The pool's change notifier uses a pipe instead of
30763077
# a multiprocessing.SimpleQueue to avoid depending on sem_open(),
@@ -3087,6 +3088,7 @@ def test_change_notifier_no_semaphore(self):
30873088
p.close()
30883089
p.join()
30893090

3091+
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
30903092
def test_change_notifier_drain(self):
30913093
# gh-134634: Verify that multiple rapid notifications (from many
30923094
# tasks completing and cache emptying) are properly drained and
@@ -3369,6 +3371,7 @@ def test_pool_worker_lifetime_early_close(self):
33693371
for (j, res) in enumerate(results):
33703372
self.assertEqual(res.get(), sqr(j))
33713373

3374+
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
33723375
def test_pool_worker_killed_mid_task(self):
33733376
# gh-134634: Verify the worker handler detects a killed worker
33743377
# via its sentinel fd and replaces it, keeping the pool functional.

0 commit comments

Comments
 (0)