Skip to content

bug: Deprecation Warning #232

@MaKaNu

Description

@MaKaNu

Description of the bug

I recognized today the following deprecation warning and since #173 is closed I guess Griffe is not in fault?

INFO    -  DeprecationWarning: Setting a fallback anchor function is deprecated and will be removed in a future release.
             File ".venv/lib/python3.12/site-packages/mkdocstrings/plugin.py", line 190, in on_config
               autorefs.get_fallback_anchor = self.handlers.get_anchors
             File ".venv/lib/python3.12/site-packages/mkdocs_autorefs/plugin.py", line 130, in get_fallback_anchor
               warn(

To Reproduce

mkdir mre
cd mre
uv init .
vim mkdocs.yml # see content below
mkdir docs
touch docs/index.md
uv add mkdocs
uv add mkdocstring[python]
uv run mkdocs serve

content of mkdocs.yml:

site_name: Deprecation

nav:
  - Home: index.md
plugins:
  - search
  - mkdocstrings:
      handlers:
        python:
          paths: ["."]

Leaving out paths results in another issue I will not discuss in this issue.

Content of index.md:

::: hello

Expected behavior

For the moment this works fine (ignoring the page of the mre doesn't render any useful, because of missing docstring.) but may cause issues in the future.

I actually oversaw the deprecation multiple time today, so...

Environment information

python -m mkdocstrings_handlers.python.debug  # | xclip -selection clipboard
  • System: Linux-6.12.8-arch1-1-x86_64-with-glibc2.40
  • Python: cpython 3.12.8 (/home/matti.kaupenjohann/05_Coding/python/mkdocs_MRE/.venv/bin/python)
  • Environment variables:
  • Installed packages:
    • mkdocs v1.6.1
    • mkdocstrings v0.27.0
    • mkdocstrings-python v1.13.0
    • griffe v1.5.5

Additional context

Metadata

Metadata

Assignees

Labels

unconfirmedThis bug was not reproduced yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions