Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 5.0.3 (2025-02-24)

- Package import now uses `importlib.metadata` to get the version and throws `PackageNotFoundError` if the package is not
installed.

# 5.0.2 (2025-01-14)

- `gql` requirement is now `3.6.0b2`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]

name = "python_anvil"
version = "5.0.2"
version = "5.0.3"
description = "Anvil API"
license = "MIT"
authors = ["Anvil Foundry Inc. <developers@useanvil.com>"]
Expand Down
6 changes: 3 additions & 3 deletions python_anvil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import PackageNotFoundError, version

from python_anvil import api, cli
from python_anvil.models import FileCompatibleBaseModel


try:
__version__ = get_distribution('python_anvil').version
except DistributionNotFound:
__version__ = version('python_anvil')
except PackageNotFoundError:
__version__ = '(local)'

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