Skip to content

Commit 0c7213a

Browse files
committed
Remove usage of pkg_resources
Fixes #131
1 parent c032492 commit 0c7213a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changes
22
=======
33

4+
Unreleased
5+
----------
6+
7+
* Removed usage of pkg_resource to avoid derecation
8+
warnings. If you want to inspect the installed version,
9+
use ``importlib.metadata.version("django-widget-tweaks")``
10+
(`docs <https://docs.python.org/3.8/library/importlib.metadata.html#distribution-versions>`__ /
11+
`backport <https://pypi.org/project/importlib-metadata/>`__).
412

513
1.4.12 (2022-01-13)
614
-------------------

widget_tweaks/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
from pkg_resources import get_distribution, DistributionNotFound
2-
3-
try:
4-
__version__ = get_distribution("django-widget-tweaks").version
5-
except DistributionNotFound:
6-
# package is not installed
7-
__version__ = None

0 commit comments

Comments
 (0)