-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove and replace pkg_resources and distutils with modern equivalents
- Loading branch information
1 parent
c9d7bf2
commit 04cfe20
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
from importlib.metadata import version, PackageNotFoundError | ||
|
||
try: | ||
__version__ = get_distribution("django-newsletter").version | ||
except DistributionNotFound: | ||
__version__ = version("django-newsletter") | ||
except PackageNotFoundError: | ||
# package is not installed | ||
__version__ = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters