File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
src/virtualenv/run/plugin Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1+ Plugins now use 'selectable' entry points.
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ project_urls =
4141packages = find:
4242install_requires =
4343 appdirs>=1.4.3,<2
44+ backports.entry_points_selectable>=1.0.4
4445 distlib>=0.3.1,<1
4546 filelock>=3.0.0,<4
4647 six>=1.9.0,<2 # keep it >=1.9.0 as it may cause problems on LTS platforms
Original file line number Diff line number Diff line change 11from __future__ import absolute_import , unicode_literals
22
3- import sys
43from collections import OrderedDict
54
6- if sys .version_info >= (3 , 8 ):
7- from importlib .metadata import entry_points
8- else :
9- from importlib_metadata import entry_points
5+ from backports .entry_points_selectable import entry_points
106
117
128class PluginLoader (object ):
@@ -15,7 +11,7 @@ class PluginLoader(object):
1511
1612 @classmethod
1713 def entry_points_for (cls , key ):
18- return OrderedDict ((e .name , e .load ()) for e in cls .entry_points ().get ( key , {} ))
14+ return OrderedDict ((e .name , e .load ()) for e in cls .entry_points ().select ( group = key ))
1915
2016 @staticmethod
2117 def entry_points ():
You can’t perform that action at this time.
0 commit comments