From 0e550c0862506443f9743b8bd32162ba4e9ac033 Mon Sep 17 00:00:00 2001 From: gsheni Date: Wed, 1 May 2024 13:41:01 -0400 Subject: [PATCH] fix task --- tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks.py b/tasks.py index 764ecf74..fd3fb924 100644 --- a/tasks.py +++ b/tasks.py @@ -9,7 +9,7 @@ import sys from pathlib import Path -import pkg_resources +from packaging.version import Version import tomli from invoke import task from packaging.requirements import Requirement @@ -56,8 +56,8 @@ def _validate_python_version(line): version_number = python_version.split(comparison)[-1].replace("'", '') comparison_function = COMPARISONS[comparison] is_valid = is_valid and comparison_function( - pkg_resources.parse_version(platform.python_version()), - pkg_resources.parse_version(version_number), + Version(platform.python_version()), + Version(version_number), ) return is_valid