sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
523 stars 75 forks source link

Server fails in python 3.9 #155

Closed allemangD closed 1 month ago

allemangD commented 2 months ago

Since 3a32d1ba serving fails due to os.path.realpath receiving unexpected argument strict. This parameter was added in 3.10. I haven't checked if there are other compatibilities issues introduced in that change.

The line is at https://github.com/sphinx-doc/sphinx-autobuild/blob/3a32d1ba/sphinx_autobuild/server.py#L26

AA-Turner commented 1 month ago

Fixed in #157

Borda commented 1 month ago

seems the problem is with the Python version; it uses the syntax of py3.10 (see: https://docs.python.org/3.10/library/os.path.html#os.path.realpath), but the package-supported version is 3.9+ https://github.com/Borda/sphinx-autobuild/blob/674264ecf1ea64b8276d80f809cd679150a2646c/pyproject.toml#L16 where the strict is missing https://docs.python.org/3.9/library/os.path.html#os.path.realpath

So we can bump the Python version or not use the strict argument...

It seems there was a fix #157, but was it released? What I see it is missing in latest 2024.04.16