]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Remove binding of captured exceptions when not used to reduce the chances of creating...
authorPablo Galindo <Pablogsal@gmail.com>
Tue, 19 Nov 2019 21:34:03 +0000 (21:34 +0000)
committerGitHub <noreply@github.com>
Tue, 19 Nov 2019 21:34:03 +0000 (21:34 +0000)
commit293dd23477eef6e7c1b1e26b5bb2c1e0d79ac3c2
tree295b4eee204f0d1e4723e62825a86310ddc27578
parentc6b20be85c0de6f2355c67ae6e7e578941275cc0
Remove binding of captured exceptions when not used to reduce the chances of creating cycles (GH-17246)

Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles.

See for example GH-13135
28 files changed:
Lib/asynchat.py
Lib/asyncio/proactor_events.py
Lib/asyncio/unix_events.py
Lib/codeop.py
Lib/ctypes/util.py
Lib/enum.py
Lib/filecmp.py
Lib/getpass.py
Lib/importlib/abc.py
Lib/lib2to3/main.py
Lib/msilib/__init__.py
Lib/multiprocessing/managers.py
Lib/multiprocessing/popen_fork.py
Lib/poplib.py
Lib/test/pythoninfo.py
Lib/test/test_cgitb.py
Lib/test/test_class.py
Lib/test/test_codecs.py
Lib/test/test_decimal.py
Lib/test/test_ftplib.py
Lib/test/test_sys_settrace.py
Lib/test/test_time.py
Lib/test/test_traceback.py
Lib/test/test_urllib2net.py
Lib/test/test_uuid.py
Lib/unittest/case.py
Lib/urllib/request.py
Lib/xml/sax/__init__.py