Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v3.8.0
======

* Use of Mapping (dict) interfaces on ``SelectableGroups``
is now flagged as deprecated. Instead, users are advised
to use the select interface for future compatibility.

v3.7.0
======

Expand All @@ -24,12 +31,10 @@ v3.6.0

``entry_points()`` now provides a future-compatible
``SelectableGroups`` object that supplies the above interface
but remains a dict for compatibility.
(except item access) but remains a dict for compatibility.

In the future, ``entry_points()`` will return an
``EntryPoints`` object, but provide for backward
compatibility with a deprecated ``__getitem__``
accessor by group and a ``get()`` method.
``EntryPoints`` object for all entry points.

If passing selection parameters to ``entry_points``, the
future behavior is invoked and an ``EntryPoints`` is the
Expand Down
5 changes: 3 additions & 2 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def values(self):
return super().values()


class SelectableGroups(dict):
class SelectableGroups(Deprecated, dict):
"""
A backward- and forward-compatible result from
entry_points that fully implements the dict interface.
Expand All @@ -270,7 +270,8 @@ def _all(self):
"""
Reconstruct a list of all entrypoints from the groups.
"""
return EntryPoints(itertools.chain.from_iterable(self.values()))
groups = super(Deprecated, self).values()
return EntryPoints(itertools.chain.from_iterable(groups))

@property
def groups(self):
Expand Down