You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f7e2a35
Browse filesBrowse the repository at this point in the historyBrowse files
docs: Explain the frequenz.core.warnings helpers in the wrapping guide
The previous commits moved the library and its tests to the
`frequenz.core.warnings` helpers, but the guide still told contributors
to silence inner deprecations with `warnings.catch_warnings()`, which is
the exact bug they fix. Anyone following it would bring the warning
amplification back.
The deprecation guide gets two new sections and an updated one:
* Keeping a moved symbol importable with `deprecated_aliases()`,
including the `TYPE_CHECKING`/`else` structure it needs, a message
carrying the version, and when a deprecated class is the better fit,
as with `ComponentId`.
* Silencing only the deprecations the library raises itself, with
`ignoring_deprecations()` around the one statement, and why
`catch_warnings()` must not be used for it.
* Testing that a replacement doesn't warn with
`asserting_no_deprecations()` instead of an "error" filter.
The testing guide points at both helpers. The helpers are mentioned as
plain code rather than cross-references because the frequenz-core
inventory will only have them once v1.5.0 is released.
Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>
0 commit comments