Skip to content

Commit

Permalink
Rely on 'selectable' interface for entry points. Fixes #2093
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 29, 2021
1 parent d255a23 commit 65ea175
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -44,7 +44,7 @@ install_requires =
distlib>=0.3.1,<1
filelock>=3.0.0,<4
six>=1.9.0,<2 # keep it >=1.9.0 as it may cause problems on LTS platforms
importlib-metadata>=0.12;python_version<"3.8"
importlib-metadata>=3.6;python_version<"3.10"
importlib-resources>=1.0;python_version<"3.7"
pathlib2>=2.3.3,<3;python_version < '3.4' and sys.platform != 'win32'
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Expand Down
4 changes: 2 additions & 2 deletions src/virtualenv/run/plugin/base.py
Expand Up @@ -3,7 +3,7 @@
import sys
from collections import OrderedDict

if sys.version_info >= (3, 8):
if sys.version_info >= (3, 10):
from importlib.metadata import entry_points
else:
from importlib_metadata import entry_points
Expand All @@ -15,7 +15,7 @@ class PluginLoader(object):

@classmethod
def entry_points_for(cls, key):
return OrderedDict((e.name, e.load()) for e in cls.entry_points().get(key, {}))
return OrderedDict((e.name, e.load()) for e in cls.entry_points(group=key))

@staticmethod
def entry_points():
Expand Down

0 comments on commit 65ea175

Please sign in to comment.