mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
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
This commit is contained in:
parent
80e4f262aa
commit
dd76b3f7d3
3 changed files with 9 additions and 0 deletions
|
@ -172,6 +172,11 @@ class APITests(
|
|||
entry_points().get('entries', 'default') == entry_points()['entries']
|
||||
entry_points().get('missing', ()) == ()
|
||||
|
||||
def test_entry_points_allows_no_attributes(self):
|
||||
ep = entry_points().select(group='entries', name='main')
|
||||
with self.assertRaises(AttributeError):
|
||||
ep.foo = 4
|
||||
|
||||
def test_metadata_for_this_package(self):
|
||||
md = metadata('egginfo-pkg')
|
||||
assert md['author'] == 'Steven Ma'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue