https://github.com/python/cpython/commit/6de8aa31f39b3d8dbfba132e6649724eb07b8348
commit: 6de8aa31f39b3d8dbfba132e6649724eb07b8348
branch: main
author: Kirill Podoprigora <[email protected]>
committer: brettcannon <[email protected]>
date: 2024-01-30T10:44:09-08:00
summary:
``importlib/_bootstrap.py``: Reduce size of ``_List`` instances (GH-114747)
Reduce size of _List instances
files:
M Lib/importlib/_bootstrap.py
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index d942045f3de666..6d6292f9559253 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
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]