0.49.0
0.49.0 - 2024-08-14
WARNING: ⚡ Imminent v1! ⚡🚀 See v0.46.
Deprecations
- Cancel deprecation of
get_logger
andpatch_loggers
(and deprecatepatch_logger
instead). Extensions need loggers too, distinct ones, and they were forgotten... Sorry for the back and forth 🙇 - Attributes
setter
anddeleter
onFunction
are deprecated. They were moved into theAttribute
class since properties are instantiated as attributes, not functions. - Extension hooks must accept
**kwargs
in their signature, to allow forward-compatibility. Accepting**kwargs
also makes it possible to remove unused arguments from the signature. - In version 1, Griffe will serialize object members as dictionaries instead of lists. Lists were initially used to preserve source order, but source order can be re-obtained thanks to the line number attributes (
lineno
,endlineno
). Version 0.49 is able to load both lists and dictionaries from JSON dumps, and version 1 will maintain this ability. However external tools loading JSON dumps will need to be updated.
Features
- Add
temporary_inspected_package
helper (3c4ba16 by Timothée Mazzucotelli). - Accept alias resolution related parameters in
temporary_visited_package
(7d5408a by Timothée Mazzucotelli). - Accept
inits
parameter intemporary_visited_package
(a4859b7 by Timothée Mazzucotelli). - Warn (DEBUG) when an object coming from a sibling, parent or external module instead of the current module or a submodule is exported (listed in
__all__
) (f82317a by Timothée Mazzucotelli). Issue-249, Related-to-PR-251 - Pass down agent to extension hooks (71acb01 by Timothée Mazzucotelli). Issue-312
- Add
source
property to docstrings, which return the docstring lines as written in the source (3f6a71a by Timothée Mazzucotelli). Issue-90
Bug Fixes
- Move
setter
anddeleter
toAttribute
class instead ofFunction
, since that's how properties are instantiated (309c6e3 by Timothée Mazzucotelli). Issue-311 - Reduce risk of recursion errors by excluding imported objects from
has_docstrings
, unless they're public (9296ca7 by Timothée Mazzucotelli). Issue-302 - Fix retrieval of annotations from parent for Yields section in properties (8a21f4d by Timothée Mazzucotelli). Issue-298
- Fix parsing Yields section (Google-style) when yielded values are tuples, and the description has more lines than tuple values (9091776 by Timothée Mazzucotelli).
- Fix condition on objects kinds when merging stubs (727f99b by Timothée Mazzucotelli).
Code Refactoring
- Sort keys when dumping JSON from the command line (8cdffe9 by Timothée Mazzucotelli). Issue-310
- Handle both lists and dicts for members when loading JSON data in preparation of v1 (f89050c by Timothée Mazzucotelli). Issue-310
- Accept
**kwargs
in extension hooks to allow forward-compatibility (2621d52 by Timothée Mazzucotelli). Issue-312 - Revert deprecation of
patch_loggers
in favor ofpatch_logger
(a20796a by Timothée Mazzucotelli). - Expose dummy
load_pypi
in non-Insiders version (a69cffd by Timothée Mazzucotelli). - Don't emit deprecation warnings through own usage of deprecated API (9922d74 by Timothée Mazzucotelli). Issue-mkdocstrings#676
- Finish preparing docstring style auto-detection feature (03bdec6 by Timothée Mazzucotelli). Issue-5
- Add DocstringStyle literal type to prepare docstring style auto detection feature (b7aaf64 by Timothée Mazzucotelli). Issue-5
- Inherit from
str, Enum
instead ofStrEnum
which needs a backport (77f1544 by Timothée Mazzucotelli). Issue-307