Skip to content

Commit

Permalink
fix pkg_resources api deprecated warning
Browse files Browse the repository at this point in the history
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
  • Loading branch information
zhuwenxing committed Dec 12, 2024
1 parent 3a1f3d1 commit 1e31969
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pymilvus/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
import re
import subprocess
from contextlib import suppress

from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import version, PackageNotFoundError

log = logging.getLogger(__name__)


__version__ = "0.0.0.dev"


with suppress(DistributionNotFound):
__version__ = get_distribution("pymilvus").version
with suppress(PackageNotFoundError):
__version__ = version("pymilvus")


def get_commit(version: str = "", short: bool = True) -> str:
Expand Down

0 comments on commit 1e31969

Please sign in to comment.