distutils is deprecated with removal planned for Python 3.12
Cirn09 opened this issue · 3 comments
kcc-c2e.exe
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Cirn09\AppData\Roaming\Python\Python312\Scripts\kcc-c2e.exe\__main__.py", line 4, in <module>
File "C:\Users\Cirn09\AppData\Roaming\Python\Python312\site-packages\kindlecomicconverter\startup.py", line 24, in <module>
from .shared import dependencyCheck
File "C:\Users\Cirn09\AppData\Roaming\Python\Python312\site-packages\kindlecomicconverter\shared.py", line 24, in <module>
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
The entire distutils package is deprecated, to be removed in Python 3.12. Its functionality for specifying package builds has already been completely replaced by third-party packages setuptools and packaging, and most other commonly used APIs are available elsewhere in the standard library (such as platform, shutil, subprocess or sysconfig). There are no plans to migrate any other functionality from distutils, and applications that are using other functions should plan to make private copies of the code. Refer to PEP 632 for discussion.
https://peps.python.org/pep-0632/#migration-advice
For these modules or types, use the standards-defined Python Packaging Authority packages specified:
distutils.version
— use the packaging package
easy to fix:
def StrictVersion(version: str) -> tuple[int]:
return map(int, version.split('.'))
partly done in
darodi@e37559b
I'm still testing docker before releasing a 5.7.0beta