@@ -43,12 +43,12 @@ class ExecutorTest:
4343
4444    # Executor.shutdown() and context manager usage is tested by 
4545    # ExecutorShutdownTest. 
46-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
46+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
4747    def  test_submit (self ):
4848        future  =  self .executor .submit (pow , 2 , 8 )
4949        self .assertEqual (256 , future .result ())
5050
51-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
51+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
5252    def  test_submit_keyword (self ):
5353        future  =  self .executor .submit (mul , 2 , y = 8 )
5454        self .assertEqual (16 , future .result ())
@@ -59,7 +59,7 @@ def test_submit_keyword(self):
5959        with  self .assertRaises (TypeError ):
6060            self .executor .submit (arg = 1 )
6161
62-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
62+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
6363    def  test_map (self ):
6464        self .assertEqual (
6565                list (self .executor .map (pow , range (10 ), range (10 ))),
@@ -69,15 +69,15 @@ def test_map(self):
6969                list (self .executor .map (pow , range (10 ), range (10 ), chunksize = 3 )),
7070                list (map (pow , range (10 ), range (10 ))))
7171
72-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
72+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
7373    def  test_map_exception (self ):
7474        i  =  self .executor .map (divmod , [1 , 1 , 1 , 1 ], [2 , 3 , 0 , 5 ])
7575        self .assertEqual (i .__next__ (), (0 , 1 ))
7676        self .assertEqual (i .__next__ (), (0 , 1 ))
7777        with  self .assertRaises (ZeroDivisionError ):
7878            i .__next__ ()
7979
80-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
80+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
8181    @support .requires_resource ('walltime' ) 
8282    def  test_map_timeout (self ):
8383        results  =  []
@@ -113,30 +113,30 @@ def test_map_buffersize_value_validation(self):
113113                ):
114114                    self .executor .map (str , range (4 ), buffersize = buffersize )
115115
116-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
116+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
117117    def  test_map_buffersize (self ):
118118        ints  =  range (4 )
119119        for  buffersize  in  (1 , 2 , len (ints ), len (ints ) *  2 ):
120120            with  self .subTest (buffersize = buffersize ):
121121                res  =  self .executor .map (str , ints , buffersize = buffersize )
122122                self .assertListEqual (list (res ), ["0" , "1" , "2" , "3" ])
123123
124-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
124+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
125125    def  test_map_buffersize_on_multiple_iterables (self ):
126126        ints  =  range (4 )
127127        for  buffersize  in  (1 , 2 , len (ints ), len (ints ) *  2 ):
128128            with  self .subTest (buffersize = buffersize ):
129129                res  =  self .executor .map (add , ints , ints , buffersize = buffersize )
130130                self .assertListEqual (list (res ), [0 , 2 , 4 , 6 ])
131131
132-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
132+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
133133    def  test_map_buffersize_on_infinite_iterable (self ):
134134        res  =  self .executor .map (str , itertools .count (), buffersize = 2 )
135135        self .assertEqual (next (res , None ), "0" )
136136        self .assertEqual (next (res , None ), "1" )
137137        self .assertEqual (next (res , None ), "2" )
138138
139-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
139+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
140140    def  test_map_buffersize_on_multiple_infinite_iterables (self ):
141141        res  =  self .executor .map (
142142            add ,
@@ -156,7 +156,7 @@ def test_map_buffersize_without_iterable(self):
156156        res  =  self .executor .map (str , buffersize = 2 )
157157        self .assertIsNone (next (res , None ))
158158
159-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
159+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
160160    def  test_map_buffersize_when_buffer_is_full (self ):
161161        ints  =  iter (range (4 ))
162162        buffersize  =  2 
@@ -168,15 +168,15 @@ def test_map_buffersize_when_buffer_is_full(self):
168168            msg = "should have fetched only `buffersize` elements from `ints`." ,
169169        )
170170
171-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
171+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
172172    def  test_shutdown_race_issue12456 (self ):
173173        # Issue #12456: race condition at shutdown where trying to post a 
174174        # sentinel in the call queue blocks (the queue is full while processes 
175175        # have exited). 
176176        self .executor .map (str , [2 ] *  (self .worker_count  +  1 ))
177177        self .executor .shutdown ()
178178
179-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
179+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
180180    @support .cpython_only  
181181    def  test_no_stale_references (self ):
182182        # Issue #16284: check that the executors don't unnecessarily hang onto 
@@ -221,7 +221,7 @@ def test_max_workers_negative(self):
221221                                        "than 0" ):
222222                self .executor_type (max_workers = number )
223223
224-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
224+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
225225    def  test_free_reference (self ):
226226        # Issue #14406: Result iterator should not keep an internal 
227227        # reference to result objects. 
@@ -234,7 +234,7 @@ def test_free_reference(self):
234234                if  wr () is  None :
235235                    break 
236236
237-     @warnings_helper .ignore_warnings ( category = DeprecationWarning )   # gh-135427  
237+     @warnings_helper .ignore_fork_in_thread_deprecation_warnings   # gh-135427  
238238    def  test_swallows_falsey_exceptions (self ):
239239        # see gh-132063: Prevent exceptions that evaluate as falsey 
240240        # from being ignored. 
0 commit comments