Skip to content

Commit 28e4d3f

Browse files
authored
Merge pull request #78 from anvilco/df/deprecation-warning
2 parents bc75e8e + 1294dc6 commit 28e4d3f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 5.0.3 (2025-02-24)
2+
3+
- Package import now uses `importlib.metadata` to get the version and throws `PackageNotFoundError` if the package is not
4+
installed.
5+
16
# 5.0.2 (2025-01-14)
27

38
- `gql` requirement is now `3.6.0b2`

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22

33
name = "python_anvil"
4-
version = "5.0.2"
4+
version = "5.0.3"
55
description = "Anvil API"
66
license = "MIT"
77
authors = ["Anvil Foundry Inc. <[email protected]>"]

python_anvil/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from pkg_resources import DistributionNotFound, get_distribution
1+
from importlib.metadata import PackageNotFoundError, version
22

33
from python_anvil import api, cli
44
from python_anvil.models import FileCompatibleBaseModel
55

66

77
try:
8-
__version__ = get_distribution('python_anvil').version
9-
except DistributionNotFound:
8+
__version__ = version('python_anvil')
9+
except PackageNotFoundError:
1010
__version__ = '(local)'
1111

1212
__all__ = ['api', 'cli', 'FileCompatibleBaseModel']

0 commit comments

Comments
 (0)