Skip to content

Commit 15a5c72

Browse files
authored
Fix DeprecationWarning for pkgutil.find_loader (#1623)
1 parent 4c2a2e6 commit 15a5c72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django_filters/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# flake8: noqa
2-
import pkgutil
2+
from importlib import util as importlib_util
33

44
from .filters import *
55
from .filterset import FilterSet
66

77
# We make the `rest_framework` module available without an additional import.
88
# If DRF is not installed, no-op.
9-
if pkgutil.find_loader("rest_framework") is not None:
9+
if importlib_util.find_spec("rest_framework"):
1010
from . import rest_framework
11-
del pkgutil
11+
del importlib_util
1212

1313
__version__ = "23.3"
1414

0 commit comments

Comments
 (0)