@@ -58,13 +58,13 @@ def test_shareable(self):
5858
5959 with self .subTest ('same interpreter' ):
6060 queue2 = queues .create ()
61- queue1 .put (queue2 , sharedonly = True )
61+ queue1 .put (queue2 , strictequiv = True )
6262 queue3 = queue1 .get ()
6363 self .assertIs (queue3 , queue2 )
6464
6565 with self .subTest ('from current interpreter' ):
6666 queue4 = queues .create ()
67- queue1 .put (queue4 , sharedonly = True )
67+ queue1 .put (queue4 , strictequiv = True )
6868 out = _run_output (interp , dedent ("""
6969 queue4 = queue1.get()
7070 print(queue4.id)
@@ -75,7 +75,7 @@ def test_shareable(self):
7575 with self .subTest ('from subinterpreter' ):
7676 out = _run_output (interp , dedent ("""
7777 queue5 = queues.create()
78- queue1.put(queue5, sharedonly =True)
78+ queue1.put(queue5, strictequiv =True)
7979 print(queue5.id)
8080 """ ))
8181 qid = int (out )
@@ -118,7 +118,7 @@ class TestQueueOps(TestBase):
118118 def test_empty (self ):
119119 queue = queues .create ()
120120 before = queue .empty ()
121- queue .put (None , sharedonly = True )
121+ queue .put (None , strictequiv = True )
122122 during = queue .empty ()
123123 queue .get ()
124124 after = queue .empty ()
@@ -133,7 +133,7 @@ def test_full(self):
133133 queue = queues .create (3 )
134134 for _ in range (3 ):
135135 actual .append (queue .full ())
136- queue .put (None , sharedonly = True )
136+ queue .put (None , strictequiv = True )
137137 actual .append (queue .full ())
138138 for _ in range (3 ):
139139 queue .get ()
@@ -147,16 +147,16 @@ def test_qsize(self):
147147 queue = queues .create ()
148148 for _ in range (3 ):
149149 actual .append (queue .qsize ())
150- queue .put (None , sharedonly = True )
150+ queue .put (None , strictequiv = True )
151151 actual .append (queue .qsize ())
152152 queue .get ()
153153 actual .append (queue .qsize ())
154- queue .put (None , sharedonly = True )
154+ queue .put (None , strictequiv = True )
155155 actual .append (queue .qsize ())
156156 for _ in range (3 ):
157157 queue .get ()
158158 actual .append (queue .qsize ())
159- queue .put (None , sharedonly = True )
159+ queue .put (None , strictequiv = True )
160160 actual .append (queue .qsize ())
161161 queue .get ()
162162 actual .append (queue .qsize ())
@@ -165,9 +165,9 @@ def test_qsize(self):
165165
166166 def test_put_get_main (self ):
167167 expected = list (range (20 ))
168- for sharedonly in (True , False ):
169- kwds = dict (sharedonly = sharedonly )
170- with self .subTest (f'sharedonly= { sharedonly } ' ):
168+ for strictequiv in (True , False ):
169+ kwds = dict (strictequiv = strictequiv )
170+ with self .subTest (f'strictequiv= { strictequiv } ' ):
171171 queue = queues .create ()
172172 for i in range (20 ):
173173 queue .put (i , ** kwds )
@@ -176,9 +176,9 @@ def test_put_get_main(self):
176176 self .assertEqual (actual , expected )
177177
178178 def test_put_timeout (self ):
179- for sharedonly in (True , False ):
180- kwds = dict (sharedonly = sharedonly )
181- with self .subTest (f'sharedonly= { sharedonly } ' ):
179+ for strictequiv in (True , False ):
180+ kwds = dict (strictequiv = strictequiv )
181+ with self .subTest (f'strictequiv= { strictequiv } ' ):
182182 queue = queues .create (2 )
183183 queue .put (None , ** kwds )
184184 queue .put (None , ** kwds )
@@ -188,9 +188,9 @@ def test_put_timeout(self):
188188 queue .put (None , ** kwds )
189189
190190 def test_put_nowait (self ):
191- for sharedonly in (True , False ):
192- kwds = dict (sharedonly = sharedonly )
193- with self .subTest (f'sharedonly= { sharedonly } ' ):
191+ for strictequiv in (True , False ):
192+ kwds = dict (strictequiv = strictequiv )
193+ with self .subTest (f'strictequiv= { strictequiv } ' ):
194194 queue = queues .create (2 )
195195 queue .put_nowait (None , ** kwds )
196196 queue .put_nowait (None , ** kwds )
@@ -199,7 +199,7 @@ def test_put_nowait(self):
199199 queue .get ()
200200 queue .put_nowait (None , ** kwds )
201201
202- def test_put_sharedonly (self ):
202+ def test_put_strictequiv (self ):
203203 for obj in [
204204 None ,
205205 True ,
@@ -210,7 +210,7 @@ def test_put_sharedonly(self):
210210 ]:
211211 with self .subTest (repr (obj )):
212212 queue = queues .create ()
213- queue .put (obj , sharedonly = True )
213+ queue .put (obj , strictequiv = True )
214214 obj2 = queue .get ()
215215 self .assertEqual (obj2 , obj )
216216
@@ -221,9 +221,9 @@ def test_put_sharedonly(self):
221221 with self .subTest (repr (obj )):
222222 queue = queues .create ()
223223 with self .assertRaises (interpreters .NotShareableError ):
224- queue .put (obj , sharedonly = True )
224+ queue .put (obj , strictequiv = True )
225225
226- def test_put_not_sharedonly (self ):
226+ def test_put_not_strictequiv (self ):
227227 for obj in [
228228 None ,
229229 True ,
@@ -237,7 +237,7 @@ def test_put_not_sharedonly(self):
237237 ]:
238238 with self .subTest (repr (obj )):
239239 queue = queues .create ()
240- queue .put (obj , sharedonly = False )
240+ queue .put (obj , strictequiv = False )
241241 obj2 = queue .get ()
242242 self .assertEqual (obj2 , obj )
243243
@@ -251,9 +251,9 @@ def test_get_nowait(self):
251251 with self .assertRaises (queues .QueueEmpty ):
252252 queue .get_nowait ()
253253
254- def test_put_get_default_sharedonly (self ):
254+ def test_put_get_default_strictequiv (self ):
255255 expected = list (range (20 ))
256- queue = queues .create (sharedonly = True )
256+ queue = queues .create (strictequiv = True )
257257 for i in range (20 ):
258258 queue .put (i )
259259 actual = [queue .get () for _ in range (20 )]
@@ -264,9 +264,9 @@ def test_put_get_default_sharedonly(self):
264264 with self .assertRaises (interpreters .NotShareableError ):
265265 queue .put (obj )
266266
267- def test_put_get_default_not_sharedonly (self ):
267+ def test_put_get_default_not_strictequiv (self ):
268268 expected = list (range (20 ))
269- queue = queues .create (sharedonly = False )
269+ queue = queues .create (strictequiv = False )
270270 for i in range (20 ):
271271 queue .put (i )
272272 actual = [queue .get () for _ in range (20 )]
@@ -285,7 +285,7 @@ def test_put_get_same_interpreter(self):
285285 from test.support.interpreters import queues
286286 queue = queues.create()
287287 orig = b'spam'
288- queue.put(orig, sharedonly =True)
288+ queue.put(orig, strictequiv =True)
289289 obj = queue.get()
290290 assert obj == orig, 'expected: obj == orig'
291291 assert obj is not orig, 'expected: obj is not orig'
@@ -298,7 +298,7 @@ def test_put_get_different_interpreters(self):
298298 self .assertEqual (len (queues .list_all ()), 2 )
299299
300300 obj1 = b'spam'
301- queue1 .put (obj1 , sharedonly = True )
301+ queue1 .put (obj1 , strictequiv = True )
302302
303303 out = _run_output (
304304 interp ,
@@ -315,7 +315,7 @@ def test_put_get_different_interpreters(self):
315315 obj2 = b'eggs'
316316 print(id(obj2))
317317 assert queue2.qsize() == 0, 'expected: queue2.qsize() == 0'
318- queue2.put(obj2, sharedonly =True)
318+ queue2.put(obj2, strictequiv =True)
319319 assert queue2.qsize() == 1, 'expected: queue2.qsize() == 1'
320320 """ ))
321321 self .assertEqual (len (queues .list_all ()), 2 )
@@ -337,8 +337,8 @@ def test_put_cleared_with_subinterpreter(self):
337337 queue = queues.Queue({ queue .id } )
338338 obj1 = b'spam'
339339 obj2 = b'eggs'
340- queue.put(obj1, sharedonly =True)
341- queue.put(obj2, sharedonly =True)
340+ queue.put(obj1, strictequiv =True)
341+ queue.put(obj2, strictequiv =True)
342342 """ ))
343343 self .assertEqual (queue .qsize (), 2 )
344344
@@ -360,12 +360,12 @@ def f():
360360 break
361361 except queues .QueueEmpty :
362362 continue
363- queue2 .put (obj , sharedonly = True )
363+ queue2 .put (obj , strictequiv = True )
364364 t = threading .Thread (target = f )
365365 t .start ()
366366
367367 orig = b'spam'
368- queue1 .put (orig , sharedonly = True )
368+ queue1 .put (orig , strictequiv = True )
369369 obj = queue2 .get ()
370370 t .join ()
371371
0 commit comments