diff options
author | Arie Bovenberg <a.c.bovenberg@gmail.com> | 2022-02-11 00:56:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 00:56:21 (GMT) |
commit | dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d (patch) | |
tree | f4b5f5b219371a356498beb9b42978f3eb5a6bfa /Lib/importlib | |
parent | 80e4f262aa27a39abf3fadc19a6323fea4607a8f (diff) | |
download | cpython-dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d.zip cpython-dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d.tar.gz cpython-dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d.tar.bz2 |
bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452)
Confirmed with @jaraco that this indeed needs a fix.
A question that came up while I was digging into the code: I think `SelectableGroups` could similarly use `__slots__ = ()`, since its purpose seems only for convenience around `dict`, not to have attributes of its own.
Automerge-Triggered-By: GH:jaraco
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/metadata/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py index 371c482..9fd6e04 100644 --- a/Lib/importlib/metadata/__init__.py +++ b/Lib/importlib/metadata/__init__.py @@ -278,6 +278,8 @@ class DeprecatedList(list): 1 """ + __slots__ = () + _warn = functools.partial( warnings.warn, "EntryPoints list interface is deprecated. Cast to list if needed.", |