Skip to content

Commit f770c71

Browse files
jaracosoxofaan
authored andcommitted
Switch to non-legacy API for loading resources. Fixes #206.
1 parent caa2b42 commit f770c71

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openeo_driver/config/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def _default_config(self) -> ContextManager[Path]:
8181
"""
8282
Default config file (as a context manager to allow it to be an ephemeral resource).
8383
"""
84-
return importlib_resources.path("openeo_driver.config", "default.py")
84+
return importlib_resources.as_file(importlib_resources.files("openeo_driver.config") / "default.py")
8585

8686
def _load(self, reason: Optional[str] = None) -> OpenEoBackendConfig:
8787
"""Load the config from config file."""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"python-dateutil",
6060
"python-json-logger>=2.0.0",
6161
"deprecated>=1.2.12",
62-
"importlib_resources<6.0.0; python_version<'3.10'", # '<6.0.0' becaue of https://github.com/Open-EO/openeo-python-driver/issues/206
62+
"importlib_resources; python_version<'3.10'",
6363
"attrs",
6464
],
6565
extras_require={

0 commit comments

Comments
 (0)