Skip to content

Commit

Permalink
Merge pull request #739 from uri-rodberg/uri_master_2023-08-01
Browse files Browse the repository at this point in the history
fixed DeprecationWarning
  • Loading branch information
uri-rodberg committed Aug 1, 2023
2 parents 37d3b10 + 2a8b071 commit c7b4531
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ jobs:
uses: codecov/codecov-action@v3
with:
name: Python ${{ matrix.python-version }}

7 changes: 4 additions & 3 deletions sorl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pkg_resources import get_distribution, DistributionNotFound
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = get_distribution("sorl-thumbnail").version
except DistributionNotFound:
__version__ = version("sorl-thumbnail")
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit c7b4531

Please sign in to comment.