-
-
Notifications
You must be signed in to change notification settings - Fork 57
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.
- Loading branch information
Showing
4 changed files
with
8 additions
and
16 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