Skip to content

Commit

Permalink
Backport PR #42006: DEP: move pkg_resources back inline in function (…
Browse files Browse the repository at this point in the history
…delayed import) (#42037)

Co-authored-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
meeseeksmachine and jorisvandenbossche authored Jun 16, 2021
1 parent ede597b commit 4b9d33a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
Sequence,
)

import pkg_resources

from pandas._config import get_option

from pandas._typing import IndexLabel
Expand Down Expand Up @@ -1745,6 +1743,8 @@ def _load_backend(backend: str) -> types.ModuleType:
types.ModuleType
The imported backend.
"""
import pkg_resources

if backend == "matplotlib":
# Because matplotlib is an optional dependency and first-party backend,
# we need to attempt an import here to raise an ImportError if needed.
Expand Down

0 comments on commit 4b9d33a

Please sign in to comment.