diff --git a/django_filters/__init__.py b/django_filters/__init__.py index c854b2c3..3586f660 100644 --- a/django_filters/__init__.py +++ b/django_filters/__init__.py @@ -1,14 +1,14 @@ # flake8: noqa -import pkgutil +from importlib import util as importlib_util from .filters import * from .filterset import FilterSet # We make the `rest_framework` module available without an additional import. # If DRF is not installed, no-op. -if pkgutil.find_loader("rest_framework") is not None: +if importlib_util.find_spec("rest_framework"): from . import rest_framework -del pkgutil +del importlib_util __version__ = "23.3"