tinker_cookbook.utils.warn_deprecated
tinker_cookbook.utils.warn_deprecated(name, removal_version, message, stacklevel)
Emit a DeprecationWarning for a deprecated feature.
Parameters:
- name (str) – Short identifier for the deprecated feature (e.g. function name, parameter name).
- removal_version (str | None) – The version in which this feature will be removed. When the running version reaches this value the warning becomes a hard error. Pass
Noneto warn without a scheduled removal. - message (str) – Additional guidance, typically a migration path such as "Use X instead."
- stacklevel (int) – Passed through to
warnings.warn. The default of 2 points at the caller of the function that callswarn_deprecated.