forked from jazzband/django-downloadview
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace use of pkg_resources (setuptools)
Since Python 3.12, setuptools isn't included with Python and importlib is the recommended replacement, available since Python 3.8. To support back to Python 3.7, this adds a dependency on importlib_metadata which provides a backport of importlib.metadata via PyPI.
- Loading branch information
Showing
4 changed files
with
12 additions
and
11 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 @@ | ||
"""Serve files with Django and reverse proxies.""" | ||
from django_downloadview.api import * # NoQA | ||
|
||
import pkg_resources | ||
import importlib_metadata | ||
|
||
#: Module version, as defined in PEP-0396. | ||
__version__ = pkg_resources.get_distribution(__package__.replace("-", "_")).version | ||
__version__ = importlib_metadata.version(__package__.replace("-", "_")) |
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
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
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