pastas.decorators.PastasDeprecationWarning#
- pastas.decorators.PastasDeprecationWarning(version: str, reason: str = '') Any#
Provide a warning or error when a Pastas class, method or function is deprecated.
This decorator manages deprecation of classes, functions, or methods across Pastas versions. The behavior depends on the current version:
If current version < version: logs a warning and allows execution to continue
If current version >= version: raises AttributeError which indicates
that it can be removed from the codebase entirely in the (near) future.
- Parameters:
- Returns:
A decorator that wraps the target class or function.
- Return type:
callable