Skip to content

Commit

Permalink
Use importlib instead of pkg_resources (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 authored Oct 31, 2023
1 parent 052427d commit f88bfba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pydust/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"""

import functools
import importlib.metadata
from pathlib import Path

import pkg_resources
import tomllib
from pydantic import BaseModel, Field, model_validator

Expand Down Expand Up @@ -75,7 +75,7 @@ def load() -> ToolPydust:

# Since Poetry doesn't support locking the build-system.requires dependencies,
# we perform a check here to prevent the versions from diverging.
pydust_version = pkg_resources.get_distribution("ziggy-pydust").version
pydust_version = importlib.metadata.version("ziggy-pydust")

# Skip 0.1.0 as it's the development version when installed locally.
if pydust_version != "0.1.0":
Expand Down

0 comments on commit f88bfba

Please sign in to comment.