Skip to content

Commit bfc76d6

Browse files
committed
fix: support for editable install
1 parent 78d91a3 commit bfc76d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/awepatch/_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from collections import defaultdict
77
from dataclasses import dataclass
88
from importlib.abc import MetaPathFinder, SourceLoader
9-
from importlib.machinery import PathFinder
9+
from importlib.util import find_spec
1010

1111
from awepatch._utils import (
1212
AWEPATCH_DEBUG,
@@ -111,7 +111,7 @@ def _get_module_info(self, module: str) -> ModuleInfo:
111111
if (module_info := self._modules.get(module)) is not None:
112112
return module_info
113113

114-
spec = PathFinder.find_spec(module, None, None)
114+
spec = find_spec(module)
115115
if spec is None or spec.origin is None:
116116
raise ValueError(f"Module {module} not found")
117117

0 commit comments

Comments
 (0)