Skip to content

Commit

Permalink
Replace pkg_resources.parse_version
Browse files Browse the repository at this point in the history
packaging.version.Version is the official replacement¹.

¹ https://packaging.pypa.io/en/latest/version.html#packaging.version.Version
  • Loading branch information
victorlin committed Sep 20, 2023
1 parent be83c92 commit 29950aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions devel/release
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 29950aa

Please sign in to comment.