From 58cc3b8d0a957b24834e08cb3fbe70c148fd17b4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 23 May 2023 19:36:06 +0800 Subject: [PATCH] kasli_generic: fix LooseVersion deprecation warning --- artiq/gateware/targets/kasli_generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/gateware/targets/kasli_generic.py b/artiq/gateware/targets/kasli_generic.py index 910ff46ca..3fc50b661 100755 --- a/artiq/gateware/targets/kasli_generic.py +++ b/artiq/gateware/targets/kasli_generic.py @@ -2,7 +2,7 @@ import argparse import logging -from distutils.version import LooseVersion +from packaging.version import Version from misoc.integration.builder import builder_args, builder_argdict from misoc.targets.kasli import soc_kasli_args, soc_kasli_argdict @@ -150,7 +150,7 @@ def main(): description = jsondesc.load(args.description) min_artiq_version = description.get("min_artiq_version", "0") - if LooseVersion(artiq_version) < LooseVersion(min_artiq_version): + if Version(artiq_version) < Version(min_artiq_version): logger.warning("ARTIQ version mismatch: current %s < %s minimum", artiq_version, min_artiq_version)