Skip to content

Commit 1e70910

Browse files
committed
fix: update import statement for resources to improve compatibility with Python 3.9+
1 parent 4e4e666 commit 1e70910

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ctranslate2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
# Adressing python 3.9 < version
1111
try:
12-
from importlib import resources
12+
from importlib.resources import files
1313

1414
# Fixed the pkg_resources depreciation
15-
package_dir = str(resources.files(module_name))
15+
package_dir = str(files(module_name))
1616
except ImportError:
1717
import pkg_resources
1818

0 commit comments

Comments
 (0)