Skip to content

Commit

Permalink
fix: pkg_resources deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Jun 9, 2024
1 parent 49b246e commit f09adc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DIRAC/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
"""
import os
import importlib.metadata
import re
import sys
import warnings
from pkgutil import extend_path
from typing import Any, Optional, Union
from pkg_resources import get_distribution, DistributionNotFound


__path__ = extend_path(__path__, __name__)
Expand All @@ -81,9 +81,9 @@

# Define Version
try:
__version__ = get_distribution(__name__).version
__version__ = importlib.metadata.version(__name__)
version = __version__
except DistributionNotFound:
except importlib.metadata.PackageNotFoundError:
# package is not installed
version = "Unknown"

Expand Down

0 comments on commit f09adc7

Please sign in to comment.