From d7f0ca258997a81501b60316615f57198dd15a31 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 29 May 2026 14:45:06 +0200 Subject: [PATCH] gh-148605: Remove irepeat() thread test from test_bytes The bytearray size has no bounds and can grow up to 4 GiB which is way too much memory. Since irepeat() calls were done in parallel, it was not possible to limit the bytearray size. --- Lib/test/test_bytes.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index b1cdbe04765ed0d..e0e8dd4eccfb1b2 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -2700,10 +2700,6 @@ def iconcat(b, a): # MODIFIES! b.wait() a += c - def irepeat(b, a): # MODIFIES! - b.wait() - a *= 2 - def subscript(b, a): b.wait() try: assert a[0] != 0xdd @@ -2837,9 +2833,10 @@ def check(funcs, a=None, *args): check([clear] + [repeat] * 10) check([clear] + [iconcat] * 10) - check([clear] + [irepeat] * 10) check([clear] + [ass_subscript] * 10) check([clear] + [repr_] * 10) + # gh-148605: Do not test "a *= 2" since it allocates up to 4 GiB using + # 10 threads # value errors