Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Commit e0a031d

Browse files
committed
Fix CI: break exception ref cycle in _MapResultIterator.__next__ (gh-74028)
Hold exc across 'raise exc' keeps the frame in the exception's referrers via its traceback; clear it in a finally like the interpreter.py fix so the strengthened test_map_exception passes for all pool types. Co-authored-by: Muse Code (Meta Muse Spark)
1 parent fb0c522 commit e0a031d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Lib/concurrent/futures/_base.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,11 @@ def __iter__(self):
723723
def __next__(self):
724724
value, exc = next(self.gen)
725725
if exc is not None:
726-
raise exc
726+
try:
727+
raise exc
728+
finally:
729+
# avoid a ref cycle where exc is captured in its traceback
730+
exc = None
727731
return value
728732

729733
def close(self):

0 commit comments

Comments
 (0)