Hello Chen, Am Wed, Mar 05, 2025 at 06:43:15AM +0000 schrieb Chen Shengqi: > Hi, > > As a plugin for mkdocs, now it would not work any more when imported: > This is what I got when I tried to build fmtlib earlier today, I believe there > are more cases, whichever uses mkdocstrings in their B-D. ... > File "/usr/lib/python3/dist-packages/mkdocstrings/plugin.py", line 29, in > <module> > from mkdocstrings.extension import MkdocstringsExtension > File "/usr/lib/python3/dist-packages/mkdocstrings/extension.py", line 38, > in <module> > from mkdocstrings.handlers.base import BaseHandler, CollectionError, > CollectorItem, Handlers > File "/usr/lib/python3/dist-packages/mkdocstrings/handlers/base.py", line > 26, in <module> > from mkdocs_get_deps.cache import download_and_cache_url > ModuleNotFoundError: No module named 'mkdocs_get_deps' > > I think this surely makes it release-critical. Packaging > mkdocs-get-deps is certainly the solution. But considering the time > before trixie freeze and effort we need to adapting to the new > version, I suggest uploading a 0.28.2+really0.27.0-3. So that every > r-dep could still use mkdocstrings, rather than being hit by a sudden > FTBFS.
it's a bit more complicated than I thought and took a while to figure out what did happen. In short, the root of this issue isn't the package mkdocstrings in a first place. But it's also true that mkdocstrings did had a missing dependency for the version the bug report is about. Upstream of MkDocs did add a dependency on mkdocs-get-deps in version 1.6.0. https://github.com/mkdocs/mkdocs/blame/master/pyproject.toml#L48 But this did not get respected within the Debian packaging and did not pop by ia failing tests e.g. So it got not detected. mkdocstrings did add a dependency on mkdocs-get-deps while the preparation for version 0.28. https://github.com/mkdocstrings/mkdocstrings/commit/bb87cd833f2333e77cb2c2926aa24a434c97391f But did now remove this dependency in 0.29 again, as it's now depending on mkdocs >= 1.6.0 which provides the functioninality on it's own that mkdocstrings is needing. https://github.com/mkdocstrings/mkdocstrings/commit/11bc400ab7089a47755f24a790c08f2f904c570b So building mkdocstrings 0.29 is working correctly, and tests don't use mkdocs-get-deps anymore, but the pulled in mkdocs package is requiring this package to get the tests running. Successfully built mkdocstrings-0.29.0-py3-none-any.whl I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with "installer" module dh_auto_test -O--buildsystem=pybuild I: pybuild pybuild:308: cp -r /build/mkdocstrings-0.29.0/docs /build/mkdocstrings-0.29.0/mkdocs.yml /build/mkdocstrings-0.29.0/*.md /build/mkdocstrings-0.29.0/src /build/mkdocstrings-0.29.0/.pybuild/cpython3_3.13_mkdocstrings/build I: pybuild base:311: cd /build/mkdocstrings-0.29.0/.pybuild/cpython3_3.13_mkdocstrings/build; python3.13 -m pytest -k 'not test_sphinx_load_mkdocstrings_inventory_file' ============================= test session starts ============================== platform linux -- Python 3.13.2, pytest-8.3.5, pluggy-1.5.0 rootdir: /build/mkdocstrings-0.29.0/.pybuild/cpython3_3.13_mkdocstrings/build configfile: pyproject.toml collected 15 items / 6 errors ==================================== ERRORS ==================================== ______________________ ERROR collecting tests/test_api.py ______________________ ImportError while importing test module '/build/mkdocstrings-0.29.0/.pybuild/cpython3_3.13_mkdocstrings/build/tests/test_api.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /usr/lib/python3.13/importlib/__init__.py:88: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests/test_api.py:12: in <module> import mkdocstrings mkdocstrings/__init__.py:8: in <module> from mkdocstrings._internal.extension import AutoDocProcessor, MkdocstringsExtension mkdocstrings/_internal/extension.py:37: in <module> from mkdocstrings._internal.handlers.base import BaseHandler, CollectionError, CollectorItem, Handlers mkdocstrings/_internal/handlers/base.py:22: in <module> from mkdocs.utils.cache import download_and_cache_url /usr/lib/python3/dist-packages/mkdocs/utils/cache.py:5: in <module> ^^^^^^^^^^^^^^^^^^^^^ import mkdocs_get_deps.cache E ModuleNotFoundError: No module named 'mkdocs_get_deps' I'll reassign this issue(s) to src:python-mkdocs as this package need to get a rebuild now as the dependency is available in the archive and the dependency for mkdocs-get-deps is getting added to the mkdocs package. Regards Carsten