Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Incompatible with griffe v1.0 #181

Closed
glennmatthews opened this issue Aug 16, 2024 · 6 comments
Closed

bug: Incompatible with griffe v1.0 #181

glennmatthews opened this issue Aug 16, 2024 · 6 comments
Assignees

Comments

@glennmatthews
Copy link

Description of the bug

Readthedocs build started failing with mkdocstrings-python v1.10.7 and mkdocstrings v0.25.2:

  File "/home/docs/checkouts/readthedocs.org/user_builds/nautobot/envs/6107/lib/python3.9/site-packages/mkdocstrings_handlers/python/handler.py", line 15, in <module>
    from griffe import (
ImportError: cannot import name 'patch_logger' from 'griffe' (/home/docs/checkouts/readthedocs.org/user_builds/nautobot/envs/6107/lib/python3.9/site-packages/griffe/__init__.py)

This appears to be because griffe v1.0 was released and contains breaking API changes, but mkdocstrings-python has no upper bound on its permitted griffe dependency that would prevent this incompatible upgrade:

    "griffe>=0.49",
@pawamoy
Copy link
Member

pawamoy commented Aug 16, 2024

Ah, obviously I had to forget the most important update. Lemme fix fix asap. And thanks for the report!

@pawamoy
Copy link
Member

pawamoy commented Aug 16, 2024

Actually could you try to upgrade mkdocstrings-python? Latest version1.10.8 should use patch_loggers, as expected by Griffe v1.

@glennmatthews
Copy link
Author

I'll test updating to 1.10.8 on Monday unless someone else on our end beats me to it, but might I suggest that prior releases of this package probably should have specified griffe>=...,<1.0 so that the new release wouldn't break previously working deployment setups? 20/20 hindsight. :-)

@glennmatthews
Copy link
Author

Had a few minutes this afternoon to test, and it does look like 1.10.8 works fine with griffe 1.0. Thanks!

@pawamoy
Copy link
Member

pawamoy commented Aug 16, 2024

Technically, I think only 1.10.7 is incompatible. The plan was always to have backward-compatible releases until Griffe v1. Python citizens usually know that it's best to avoid upper bounds, as unfortunate breakages can always be avoided downstream, while upstream constraints cannot be cancelled.

Also, dependency upgrade processes should probably upgrade everything at once (maintaining compatible versions), not just one package at a time.

Long story short: I do my best to keep things working, all you have to do is stay up to date with each dependency (or pin them) ^^

@pawamoy
Copy link
Member

pawamoy commented Aug 16, 2024

But yeah, the patch_logger/patch_loggers is my mistake (see Griffe's changelog) ^^'

@pawamoy pawamoy removed the unconfirmed This bug was not reproduced yet label Aug 17, 2024
@pawamoy pawamoy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2024
@pawamoy pawamoy pinned this issue Aug 17, 2024
@pawamoy pawamoy unpinned this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants