Skip to content

Commit

Permalink
Switch to non-legacy API for loading resources. Fixes Open-EO#206.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 14, 2023
1 parent 1f19e33 commit 6579be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openeo_driver/config/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _default_config(self) -> ContextManager[Path]:
"""
Default config file (as a context manager to allow it to be an ephemeral resource).
"""
return importlib_resources.path("openeo_driver.config", "default.py")
return importlib_resources.as_file(importlib_resources.files("openeo_driver.config") / "default.py")

def _load(self, reason: Optional[str] = None) -> OpenEoBackendConfig:
"""Load the config from config file."""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"python-dateutil",
"python-json-logger>=2.0.0",
"deprecated>=1.2.12",
"importlib_resources<6.0.0; python_version<'3.10'", # '<6.0.0' becaue of https://github.com/Open-EO/openeo-python-driver/issues/206
"importlib_resources; python_version<'3.10'",
"attrs",
],
extras_require={
Expand Down

0 comments on commit 6579be9

Please sign in to comment.