# tinker_cookbook.utils.deprecated

### [**tinker_cookbook.utils.deprecated**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L140)( __func__, __message__, __removal_version__)

Decorator to mark a function or class as deprecated.

Can be used with or without arguments::

@deprecated
    def old(): ...

@deprecated(message="Use new_func instead.\", removal_version="0.20.0")
    def old(): ...

When applied to a class, the warning is emitted at instantiation time.

**Parameters:**

- [**_func**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L141) ( _Callable[..., Any] | None_)
- [**message**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L143) ( _str_)
- [**removal_version**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/utils/deprecation.py#L144) ( _str | None_)

**Returns:** _Any_
