From 29950aa53bf76833ebb7e1f35767f3f0b3707614 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:16:12 -0700 Subject: [PATCH] Replace pkg_resources.parse_version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit packaging.version.Version is the official replacement¹. ¹ https://packaging.pypa.io/en/latest/version.html#packaging.version.Version --- devel/release | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/release b/devel/release index cf42810c5..0b864b83d 100755 --- a/devel/release +++ b/devel/release @@ -88,9 +88,9 @@ assert-version-is-new() { version-is-gt() { python3 /dev/stdin "$1" "$2" <<<"$(cut -c 9- <<<' from sys import argv, exit - from pkg_resources import parse_version + from packaging.version import Version - version = list(map(parse_version, argv[1:3])) + version = list(map(Version, argv[1:3])) gt = version[1] > version[0]