While doing some work on hydromt to make it warning free, this error bubbled up from xugrid:
.pixi/envs/full-py311/lib/python3.11/site-packages/xugrid/data/sample_data.py:16: in <module>
with importlib.resources.files("xugrid.data") as path:
.pixi/envs/full-py311/lib/python3.11/pathlib.py:891: in __enter__
warnings.warn("pathlib.Path.__enter__() is deprecated and scheduled "
E DeprecationWarning: pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op
The use of pathlib.Path is deprecated and should not be used. We can just assign the path directly, and clean it up after if necessary. I'll be happy to open a PR for this if anyone is interested. Thanks!
While doing some work on
hydromt
to make it warning free, this error bubbled up fromxugrid
:The code in question is this: https://github.com/Deltares/xugrid/blob/1390aeb3e0a49a1989e845f7f238c84827708bee/xugrid/data/sample_data.py#L16
The use of
pathlib.Path
is deprecated and should not be used. We can just assign the path directly, and clean it up after if necessary. I'll be happy to open a PR for this if anyone is interested. Thanks!