Skip to content

Commit 2ee096a

Browse files
authored
Merge pull request #98 from KKONZ/update_for_3.12
Update for python 3.12
2 parents 78b6240 + 4722707 commit 2ee096a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

language_tool_python/download_lt.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from typing import Optional
1414
import zipfile
1515

16-
from distutils.spawn import find_executable
16+
from shutil import which
1717
from urllib.parse import urljoin
1818
from .utils import (
1919
find_existing_language_tool_downloads,
@@ -42,7 +42,6 @@
4242
r'^(?:java|openjdk) [version ]?(?P<major1>\d+)\.(?P<major2>\d+)',
4343
re.MULTILINE)
4444

45-
4645
def parse_java_version(version_text):
4746
"""Return Java version (major1, major2).
4847
@@ -74,7 +73,7 @@ def parse_java_version(version_text):
7473

7574
def confirm_java_compatibility():
7675
""" Confirms Java major version >= 8. """
77-
java_path = find_executable('java')
76+
java_path = which('java')
7877
if not java_path:
7978
raise ModuleNotFoundError(
8079
'No java install detected. '

0 commit comments

Comments
 (0)