Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecated importlib_resources.path #206

Closed
soxofaan opened this issue Jul 12, 2023 · 1 comment
Closed

deprecated importlib_resources.path #206

soxofaan opened this issue Jul 12, 2023 · 1 comment

Comments

@soxofaan
Copy link
Member

Integration tests started failing with

  File "/opt/venv/lib64/python3.8/site-packages/openeo_driver/config/load.py", line 76, in get
    self._config = self._load()
  File "/opt/venv/lib64/python3.8/site-packages/openeo_driver/config/load.py", line 87, in _load
    with self._default_config() as default_config:
  File "/opt/venv/lib64/python3.8/site-packages/openeogeotrellis/config/load.py", line 16, in _default_config
    return importlib_resources.path("openeogeotrellis.config", "default.py")
AttributeError: module 'importlib_resources' has no attribute 'path'

probably since 6.0.0 release of https://github.com/python/importlib_resources (last week)

@soxofaan
Copy link
Member Author

indeed, importlib_resources v6 dropped "legacy" API importlib_resources.path: python/importlib_resources#284

apparently it's only officially deprecated since python 3.11: https://docs.python.org/3.11/library/importlib.resources.html#importlib.resources.path and the alternative as_file is only available since python 3.9 (while we're still on python 3.8)

So only solutions (while still on python 3.8) is to pin to importlib_resources<6.0.0 (or avoid having to use importlib_resources.path completely)

jaraco added a commit to jaraco/openeo-python-driver that referenced this issue Jul 14, 2023
soxofaan added a commit that referenced this issue Jul 17, 2023
soxofaan added a commit to Open-EO/openeo-geopyspark-driver that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant