File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44import inspect
55from abc import ABC , abstractmethod
66from pathlib import Path
7+ import importlib .resources
78
8- import pkg_resources
99import stevedore
1010import stevedore .exception
1111
@@ -42,7 +42,7 @@ def _extension_dirpath(ext: stevedore.extension.Extension) -> Path:
4242 Returns:
4343 A absolute Path to the package containing the extension.
4444 """
45- return Path (pkg_resources . resource_filename (ext .module_name , "" ))
45+ return Path (importlib . resources . files (ext .module_name ))
4646
4747
4848class Extension (ABC ):
@@ -72,7 +72,7 @@ def name(self) -> str:
7272 def dirpath (cls ):
7373 """The directory path to the extension package."""
7474 package_name = inspect .getmodule (cls ).__package__
75- return pkg_resources . resource_filename (package_name , "" )
75+ return Path ( importlib . resources . files (package_name ) )
7676
7777 @property
7878 def version (self ):
You can’t perform that action at this time.
0 commit comments