Skip to content

Commit

Permalink
Fix DeprecationWarning: pkg_resources is deprecated as an API
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Feb 12, 2024
1 parent 723797c commit 4e29935
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apio/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
# -- Licence GPLv2
"""TODO"""

import importlib.metadata
import click

from pkg_resources import get_distribution

from apio.util import get_pypi_latest_version


Expand All @@ -17,7 +16,7 @@
def cli(ctx):
"""Check the latest Apio version."""

current_version = get_distribution("apio").version
current_version = importlib.metadata.version("apio")
latest_version = get_pypi_latest_version()

if latest_version is None:
Expand Down

0 comments on commit 4e29935

Please sign in to comment.