We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdabf3b commit 98dec8eCopy full SHA for 98dec8e
xarray/core/formatting_html.py
@@ -2,8 +2,7 @@
2
from collections import OrderedDict
3
from functools import lru_cache, partial
4
from html import escape
5
-
6
-import pkg_resources
+from importlib import resources
7
8
from .formatting import inline_variable_array_repr, short_data_repr
9
from .options import _get_boolean_with_default
@@ -15,7 +14,7 @@
15
14
def _load_static_files():
16
"""Lazily load the resource files into memory the first time they are needed"""
17
return [
18
- pkg_resources.resource_string("xarray", fname).decode("utf8")
+ resources.files("xarray").joinpath(fname).read_bytes().decode("utf8")
19
for fname in STATIC_FILES
20
]
21
0 commit comments