Skip to content

Commit 4711968

Browse files
committed
Removed usage of deprecated pkg_resources jazzband#541
1 parent 83601b9 commit 4711968

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

polymorphic/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
Please see LICENSE and AUTHORS for more information.
77
"""
88

9-
import pkg_resources
9+
VERSION = "3.1.0"
1010

11-
try:
12-
__version__ = pkg_resources.require("django-polymorphic")[0].version
13-
except pkg_resources.DistributionNotFound:
14-
__version__ = None # for RTD among others
11+
# version synonym for backwards compatibility
12+
__version__ = VERSION

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = django-polymorphic
3-
version = 3.1.0
3+
version = attr: polymorphic.VERSION
44
description = Seamless polymorphic inheritance for Django models
55
long_description = file:README.rst
66
author = Bert Constantin

0 commit comments

Comments
 (0)