|
| 1 | +from ..entry_points import load_eps_by_group |
| 2 | + |
1 | 3 | import abc |
2 | 4 | import logging |
3 | 5 | import os |
4 | | -import pkg_resources |
5 | 6 | import platform |
6 | 7 | import queue |
7 | 8 | import re |
@@ -93,20 +94,16 @@ def should_update(self, **kwargs) -> bool: |
93 | 94 | return update |
94 | 95 |
|
95 | 96 | @abc.abstractmethod |
96 | | - def checkout(self, **kwargs) -> typing.Union[str, None]: |
97 | | - ... |
| 97 | + def checkout(self, **kwargs) -> typing.Union[str, None]: ... |
98 | 98 |
|
99 | 99 | @abc.abstractmethod |
100 | | - def status(self, **kwargs) -> typing.Union[typing.Tuple[str, str], str]: |
101 | | - ... |
| 100 | + def status(self, **kwargs) -> typing.Union[typing.Tuple[str, str], str]: ... |
102 | 101 |
|
103 | 102 | @abc.abstractmethod |
104 | | - def matches(self) -> bool: |
105 | | - ... |
| 103 | + def matches(self) -> bool: ... |
106 | 104 |
|
107 | 105 | @abc.abstractmethod |
108 | | - def update(self, **kwargs) -> typing.Union[str, None]: |
109 | | - ... |
| 106 | + def update(self, **kwargs) -> typing.Union[str, None]: ... |
110 | 107 |
|
111 | 108 |
|
112 | 109 | def yesno( |
@@ -151,12 +148,12 @@ def get_workingcopytypes() -> typing.Dict[str, typing.Type[BaseWorkingCopy]]: |
151 | 148 | return _workingcopytypes |
152 | 149 | group = "mxdev.workingcopytypes" |
153 | 150 | addons = {} |
154 | | - for entrypoint in pkg_resources.iter_entry_points(group=group): |
| 151 | + for entrypoint in load_eps_by_group(group): |
155 | 152 | key = entrypoint.name |
156 | 153 | workingcopytype = entrypoint.load() |
157 | 154 | if not entrypoint.dist: |
158 | 155 | continue |
159 | | - if entrypoint.dist.project_name == "mxdev": |
| 156 | + if entrypoint.dist.name == "mxdev": |
160 | 157 | _workingcopytypes[key] = workingcopytype |
161 | 158 | continue |
162 | 159 | if key in addons: |
|
0 commit comments