0.48.0
0.48.0 - 2024-07-15
WARNING: ⚡ Imminent v1! ⚡🚀 See v0.46.
Deprecations
- All submodules are deprecated. All objects are now exposed in the top-level
griffe
module. - All logger names are deprecated, and will be replaced with
"griffe"
in v1. In v1 our single"griffe"
logger will provide a method to temporarily disable logging, [logger.disable()
][griffe.Logger.disable], since that's the most common third-party use. - The
get_logger
function is deprecated. Instead, we'll use a globallogger
internally, and users are welcome to use it too. - The
patch_loggers
function is renamedpatch_logger
. - Following the logging changes, the [
docstring_warning
][griffe.docstring_warning] function can now directly log a warning message instead of returning a callable that does. Passing it a logger name (to get a callable) is deprecated in favor of passing it a docstring, message and offset directly.
Features
- Support
FORCE_COLOR
environment variable (e1b7bd9 by Timothée Mazzucotelli).
Bug Fixes
- Don't take a shortcut to the end of an alias chain when getting/setting/deleting alias members (1930609 by Timothée Mazzucotelli).
- Short-circuit
__all__
convention when checking if a module is public (5abf4e3 by Timothée Mazzucotelli). - Reuse existing loggers, preventing overwriting issues (3c2825f by Timothée Mazzucotelli).
- Ignore .pth files that are not utf-8 encoded (ea299dc by Andrew Sansom). Issue-300, PR-301
- Attributes without annotations cannot be dataclass parameters (c9b2e09 by Hassan Kibirige). PR-297
- When deciding to alias an object or not during inspection, consider module paths to be equivalent even with arbitrary private components (8c9f6e6 by Timothée Mazzucotelli). Issue-296
- Fix target path computation: use qualified names to maintain classes in the path (6e17def by Timothée Mazzucotelli). Issue-296
Code Refactoring
- Prepare loggers for simplification (381f10f by Timothée Mazzucotelli).
- Add all previous modules for backward compatibility (a86e44e by Timothée Mazzucotelli).
- Add main public modules (fb860b3 by Timothée Mazzucotelli).
- Simplify "is imported" check in
is_public
property (c2bbc10 by Timothée Mazzucotelli). - Use string and integer enumerations (06b383b by Timothée Mazzucotelli).
- Renamed agents nodes modules (ddc5b0c by Timothée Mazzucotelli).
- Clean up and document internal API, mark legacy code (92594a9 by Timothée Mazzucotelli).
- Renamed
dataclasses
internal modules tomodels
(5555de6 by Timothée Mazzucotelli). - Move sources under
_griffe
internal package (cbce6a5 by Timothée Mazzucotelli).