Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use packaging instead of deprecated distutils Version classes #1735

Merged
merged 3 commits into from
Aug 9, 2022
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import subprocess
import sys
import time
from distutils.version import StrictVersion

import git
import prompt_toolkit
Expand All @@ -24,6 +23,7 @@
import requests_cache
import rich
import yaml
from packaging.version import Version
from rich.live import Live
from rich.spinner import Spinner

Expand Down Expand Up @@ -76,7 +76,7 @@ def check_if_outdated(current_version=None, remote_version=None, source_url="htt
response = requests.get(source_url, timeout=3)
remote_version = re.sub(r"[^0-9\.]", "", response.text)
# Check if we have an available update
is_outdated = StrictVersion(remote_version) > StrictVersion(current_version)
is_outdated = Version(remote_version) > Version(current_version)
return (is_outdated, current_version, remote_version)


Expand Down