Skip to content

Commit 3f97940

Browse files
jorisvandenbosschemeeseeksmachine
authored andcommitted
Backport PR pandas-dev#42006: DEP: move pkg_resources back inline in function (delayed import)
1 parent 0c1e59c commit 3f97940

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/plotting/_core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
Sequence,
88
)
99

10-
import pkg_resources
11-
1210
from pandas._config import get_option
1311

1412
from pandas._typing import IndexLabel
@@ -1745,6 +1743,8 @@ def _load_backend(backend: str) -> types.ModuleType:
17451743
types.ModuleType
17461744
The imported backend.
17471745
"""
1746+
import pkg_resources
1747+
17481748
if backend == "matplotlib":
17491749
# Because matplotlib is an optional dependency and first-party backend,
17501750
# we need to attempt an import here to raise an ImportError if needed.

0 commit comments

Comments
 (0)