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.
This commit is contained in:
@@ -4,8 +4,7 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# TODO: LooseVersion is undocumented; use something else.
|
from looseversion import LooseVersion
|
||||||
from distutils.version import LooseVersion
|
|
||||||
|
|
||||||
import lit.formats
|
import lit.formats
|
||||||
import lit.util
|
import lit.util
|
||||||
|
|||||||
Reference in New Issue
Block a user