From 1492e5f1d5a6d302f32ab95910c75b960b611128 Mon Sep 17 00:00:00 2001 From: dyung Date: Sat, 20 Jul 2024 12:08:35 -0700 Subject: [PATCH] Replace distutils.version with looseversion since the former was deprecated in python 3.10 and removed in 3.12. (#99549) Python deprecated the distutils package in 3.10, and removed it in 3.12 causing problems when trying to run the lit tests with 3.12. https://docs.python.org/3.10/library/distutils.html Replace usage with the looseversion package which should be a drop-in replacement for the original usage. If your testing fails after this commit, you need to install the looseversion package. --- cross-project-tests/lit.cfg.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cross-project-tests/lit.cfg.py b/cross-project-tests/lit.cfg.py index 774c4eaf4d97..47062866fbc2 100644 --- a/cross-project-tests/lit.cfg.py +++ b/cross-project-tests/lit.cfg.py @@ -4,8 +4,7 @@ import re import subprocess import sys -# TODO: LooseVersion is undocumented; use something else. -from distutils.version import LooseVersion +from looseversion import LooseVersion import lit.formats import lit.util