Skip to content

Commit

Permalink
Switch from pkg_resources to importlib.metadata to avoid DeprecationW…
Browse files Browse the repository at this point in the history
…arning
  • Loading branch information
tok3rat0r committed Jun 1, 2023
1 parent b3fb2ab commit b08c2c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions django_hosts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# flake8: noqa
import pkg_resources
from importlib.metadata import version

try: # pragma: no cover
from django_hosts.defaults import patterns, host
Expand All @@ -8,5 +7,5 @@
except ImportError: # pragma: no cover
pass

__version__ = pkg_resources.get_distribution('django-hosts').version
__version__ = version('django-hosts')
__author__ = 'Jazzband members (https://jazzband.co/)'

0 comments on commit b08c2c8

Please sign in to comment.