This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: keeps too much stuff alive when it patches builtins
Type: resource usage Stage: resolved
Components: Library (Lib) Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, sbt
Priority: normal Keywords: patch

Created on 2013-08-01 20:49 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
sitebuiltins.patch pitrou, 2013-08-01 20:49 review
Messages (3)
msg194117 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-01 20:49
The site module patches the builtins module unless Python is run with -S. Unfortunately, this means the builtins dict then keeps the site module globals alive until the end of interpreter shutdown, preventing the garbage collection of many other objects or modules.

Attached patch isolates those patched builtins inside a separate module "_sitebuiltins".
msg194572 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-08-06 20:57
New changeset 8584f63e570e by Antoine Pitrou in branch 'default':
Issue #18621: Prevent the site module's patched builtins from keeping too many references alive for too long.
msg194573 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-06 20:59
I went ahead and committed this, so that the effect of other improvements in the area stand out better.
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62821
2013-08-06 20:59:05pitrousetstatus: open -> closed
resolution: fixed
messages: + msg194573

stage: patch review -> resolved
2013-08-06 20:57:38python-devsetnosy: + python-dev
messages: + msg194572
2013-08-01 20:49:56pitroucreate