From: Kirill Podoprigora Date: Tue, 30 Jan 2024 18:44:09 +0000 (+0300) Subject: ``importlib/_bootstrap.py``: Reduce size of ``_List`` instances (GH-114747) X-Git-Tag: v3.13.0a4~252 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6de8aa31f39b3d8dbfba132e6649724eb07b8348;p=thirdparty%2FPython%2Fcpython.git ``importlib/_bootstrap.py``: Reduce size of ``_List`` instances (GH-114747) Reduce size of _List instances --- diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index d942045f3de6..6d6292f95592 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -53,7 +53,7 @@ def _new_module(name): # For a list that can have a weakref to it. class _List(list): - pass + __slots__ = ("__weakref__",) # Copied from weakref.py with some simplifications and modifications unique to