Open 991jo opened 2 years ago
Thanks. I guess the needed work entails replacing uses of distutils.sysconfig.get_python_lib()
:
https://github.com/pdoc3/pdoc/blob/f358893e4fcfd7f29857a7ff5491b606ff146d39/pdoc/cli.py#L490-L491
https://github.com/pdoc3/pdoc/blob/2cce30a9b55eeeddc1ed826c8a2ada53777c3eea/pdoc/html_helpers.py#L625-L627
with appropriate calls to sysconfig.get_path()
?
I guess this is the relevant replacement function sysconfig.get_path('platlib')
, see https://bugs.python.org/issue41282#msg393018 for further infromations.
Is there any progress here? It seems like pdoc3
does not work with Python 3.12 due to this issue: pdoc3 --html --output-dir docs foo --force
gives the error
Traceback (most recent call last):
File "/home/willi/Documents/GitHub/pedantic-python-decorators/.venv/bin/pdoc3", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/willi/Documents/GitHub/pedantic-python-decorators/.venv/lib/python3.12/site-packages/pdoc/cli.py", line 490, in main
from distutils.sysconfig import get_python_lib
ModuleNotFoundError: No module named 'distutils'
Temporarily, I've edited the file: lib/python3.10/site-packages/pdoc/cli.py Replacing lines 490, 491 with: from sysconfig import get_path libdir = get_path('platlib')
This is working for me just fine.
Adding a voice, would be great to have pydoc3 working in python 3.12, thanks
Apparently distutils is getting deprecated in Python 3.12. For more details see PEP-632
Expected Behavior
Not getting spammed with deprecation warnings.
Actual Behavior
I see some deprecation warnings.
Steps to Reproduce
--help
or--version
commands does not work to trigger the deprecation warnings.Additional info
pdoc3 0.10.0