From 0c819641d314ac496eb32b55f2b15215fa6fa55f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 1 Oct 2022 18:43:09 -0400 Subject: [PATCH] Remove compatibility for EntryPoints.__getitem__ by index. --- importlib_metadata/__init__.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index 9908ac72..c243ff61 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -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: