Releases: mkdocstrings/griffe
Releases · mkdocstrings/griffe
0.46.1
0.46.0
0.46.0 - 2024-06-16
WARNING: ⚡ Imminent v1! ⚡🚀
We are working on v1, and it will come soon, so we recommend that you consider adding an upper bound on Griffe. Version 1 will remove all legacy code! There will be a couple more v0 before so that you get all the deprecation warnings needed to upgrade your code using Griffe before upgrading to v1. See breaking changes and deprecations for v0.46 below.
Breaking Changes
We are still in v0, so no major bump yet.
- Calling objects' [
has_labels()
][griffe.Object.has_labels] method with alabels
keyword argument is not supported anymore. The parameter became a variadic positional parameter, so it cannot be used as a keyword argument anymore. Passing a sequence instead of multiple positional arguments still works but will emit a deprecation warning. - Calling the [
load_extensions()
][griffe.load_extensions] function with anexts
keyword argument is not supported anymore. The parameter became a variadic positional parameter, so it cannot be used as a keyword argument anymore. Passing a sequence instead of multiple positional arguments still works but will emit a deprecation warning.
Deprecations
- As seen above in the breaking changes section, the only parameters of [
Object.has_labels()
][griffe.Object.has_labels] and [load_extensions()
][griffe.load_extensions] both became variadic positional parameters. Passing a sequence as single argument is deprecated in favor of passing multiple arguments. This is an ergonomic change: I myself often forgot to wrap extensions in a list. Passing sequences of labels (lists, sets, tuples) is also difficult from Jinja templates. - The following methods and properties on objects and aliases are deprecated: [
member_is_exported()
][griffe.Object.member_is_exported], [is_explicitely_exported
][griffe.mixins.ObjectAliasMixin.is_explicitely_exported], [is_implicitely_exported
][griffe.mixins.ObjectAliasMixin.is_implicitely_exported]. Use the [is_exported
][griffe.mixins.ObjectAliasMixin.is_exported] property instead. See issue 281. - The [
is_exported()
][griffe.mixins.ObjectAliasMixin.is_exported] and [is_public()
][griffe.mixins.ObjectAliasMixin.is_public] methods became properties. They can still be called like methods, but will emit deprecation warnings when doing so. See issue 281. - The
ignore_private
parameter of the [find_breaking_changes()
][griffe.find_breaking_changes] function is now deprecated and unused. With the reworked "exported" and "public" API, this parameter became useless. See issue 281. - Using
stats()
instead of [Stats
][griffe.stats.Stats] will now emit a deprecation warning.
Features
- Add
docstring
attribute to parameters (e21eabe by Hassan Kibirige). Issue-286, Related-to-mkdocstrings/griffe#252, PR-288, Co-authored-by: Timothée Mazzucotelli dev@pawamoy.fr - Provide line numbers for classes and functions when inspecting (b6ddcc4 by Timothée Mazzucotelli). Issue-272
- Populate lines collection within helpers (ab2e947 by Timothée Mazzucotelli). GitHub-issue-270, Radicle-issue-0d6a513
Bug Fixes
- Handle partials as functions while inspecting (be29c32 by Timothée Mazzucotelli).
- Populate lines collection before visiting/inspecting modules within helpers (08c3f40 by Timothée Mazzucotelli). Issue-272
- Don't return all lines when line numbers are missing (9e6dcaa by Timothée Mazzucotelli). Issue-271
Code Refactoring
- Emit deprecation warning when accessing
stats
instead ofStats
(e5572d2 by Timothée Mazzucotelli). - Rework "exported" and "public" logic (b327b90 by Timothée Mazzucotelli). Issue-281
- Allow passing multiple extensions to
load_extensions
instead of a sequence (fadb72b by Timothée Mazzucotelli). Issue-268 - Allow passing multiple labels to
Object.has_labels
instead of set (c4e3bf2 by Timothée Mazzucotelli). Issue-267
0.45.3
0.45.3 - 2024-06-09
Bug Fixes
0.45.2
0.45.2 - 2024-05-23
Bug Fixes
0.45.1
0.45.1 - 2024-05-18
Bug Fixes
0.45.0
0.45.0 - 2024-05-12
Features
- Implement
-x
,--force-inspection
CLI option (776063d by Timothée Mazzucotelli). - Implement
force_inspection
option in the loader API (3266f22 by Timothée Mazzucotelli). - Support inspecting packages (
__init__
modules) (3f74f67 by Timothée Mazzucotelli). - Add parameters for resolving aliases to
load
functions (e418dee by Timothée Mazzucotelli). - Load private sibling modules by default when resolving aliases (4806189 by Timothée Mazzucotelli).
Bug Fixes
- Pass down modules collection when inspecting (bc0f74b by Timothée Mazzucotelli).
- Catch loading errors when loading additional modules during wildcard expansion and alias resolution (964e0d2 by Timothée Mazzucotelli).
Code Refactoring
- Improve stats code and performance (eeb497f by Timothée Mazzucotelli).
- Recurse immediately into non-discoverable submodules (no path on disk) during dynamic analysis (d0b7a1d by Timothée Mazzucotelli).
- Simplify the code that checks if an object should be aliased or not during dynamic analysis (fc794c2 by Timothée Mazzucotelli).
- Avoid side-effect in inspector by checking early if an object is a cached property (a6bfcfd by Timothée Mazzucotelli).
0.44.0
0.43.0
0.43.0 - 2024-04-18
Features
- Add properties telling whether an expression name resolves to an enumeration class, instance or value (fdb21d9 by Timothée Mazzucotelli). Issue-mkdocstrings/python#124