# tinker_cookbook.utils.warn_deprecated

### [**tinker_cookbook.utils.warn_deprecated**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L87)( _name_, _removal_version_, _message_, _stacklevel_)

Emit a DeprecationWarning for a deprecated feature.

If the current package version is at or past _removal_version_, raises a `RuntimeError` instead so that stale deprecated code paths are not silently used after their intended removal date.

**Parameters:**

- [**name**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L88) ( _str_) – Short identifier for the deprecated feature (e.g. function name, parameter name).
- [**removal_version**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L90) ( _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 `None` to warn without a scheduled removal.
- [**message**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L91) ( _str_) – Additional guidance, typically a migration path such as "Use X instead."
- [**stacklevel**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L92) ( _int_) – Passed through to `warnings.warn`. The default of 2 points at the caller of the function that calls [`warn_deprecated`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/utils/warn_deprecated/).

**Returns:** _None_
