Skip to content

Commit 71a0c62

Browse files
dyungyuxuanchen1997
authored andcommitted
Replace distutils.version with looseversion since the former was deprecated in python 3.10 and removed in 3.12. (#99549)
Summary: 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. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251589
1 parent e378b59 commit 71a0c62

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cross-project-tests/lit.cfg.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import subprocess
55
import sys
66

7-
# TODO: LooseVersion is undocumented; use something else.
8-
from distutils.version import LooseVersion
7+
from looseversion import LooseVersion
98

109
import lit.formats
1110
import lit.util

0 commit comments

Comments
 (0)