Skip to content

Commit

Permalink
Remove compatibility for EntryPoints.__getitem__ by index.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 1, 2022
1 parent 47544ce commit 0c81964
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions importlib_metadata/__init__.py
Expand Up @@ -220,14 +220,6 @@ def __getitem__(self, name): # -> EntryPoint:
"""
Get the EntryPoint in self matching name.
"""
if isinstance(name, int):
warnings.warn(
"Accessing entry points by index is deprecated. "
"Cast to tuple if needed.",
DeprecationWarning,
stacklevel=2,
)
return super().__getitem__(name)
try:
return next(iter(self.select(name=name)))
except StopIteration:
Expand Down

0 comments on commit 0c81964

Please sign in to comment.