Skip to content

Commit 6579be9

Browse files
committed
Switch to non-legacy API for loading resources. Fixes Open-EO#206.
1 parent 1f19e33 commit 6579be9

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
@@ -77,7 +77,7 @@ def _default_config(self) -> ContextManager[Path]:
7777
"""
7878
Default config file (as a context manager to allow it to be an ephemeral resource).
7979
"""
80-
return importlib_resources.path("openeo_driver.config", "default.py")
80+
return importlib_resources.as_file(importlib_resources.files("openeo_driver.config") / "default.py")
8181

8282
def _load(self, reason: Optional[str] = None) -> OpenEoBackendConfig:
8383
"""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)