Closed stweil closed 5 months ago
See also https://github.com/OCR-D/spec/blob/master/decisions.md#supported-python-versions: "We will start to support 3.12 in Q2 2023 (:warning: won't have distutils anymore)".
Other processors / components which also still use distutils:
This also seems to break native Windows support of all things. They have Python 3.12.
(Never used, just tested if dinglehopper would work with the Microsoft Store's Python, because users)
Replacing from distutils.spawn import find_executable as which
with from shutil import which
in os.py
seems to fix my immediate problem. However I'm not sure if they have the same semantics.
Other instances of distutils usage:
find_executable
(3 in total)from distutils.dir_util import copy_tree
(Also possibly replacable by shutil?) (1 in total)Replacing
from distutils.spawn import find_executable as which
withfrom shutil import which
inos.py
seems to fix my immediate problem. However I'm not sure if they have the same semantics.
'from setuptools._distutils.spawn import find_executable
(+ Adding setuptools
to requirements, if necessary) may be the safer way for now.
* `from distutils.dir_util import copy_tree` (Also possibly replacable by shutil?) (1 in total)
from setuptools._distutils.dir_util import copy_tree
PR #1219 was merged, therefore I close this issue.
Citing https://peps.python.org/pep-0632/:
core still uses distutils. Therefore tests with Python 3.12 now fail, and older Python versions can trigger a deprecation warning (cf. issue #850).