deprecation#
Helper functions for code deprecation.
Module Contents#
Functions#
| 
 | Decorator for deprecated function and method arguments. | 
| 
 | Helper function for deprecating function arguments. | 
- deprecated_arg_alias(depr_version: str, **aliases: str) Callable[source]#
- Decorator for deprecated function and method arguments. - From https://stackoverflow.com/a/49802489. - Use as follows: - @deprecated_arg_alias("0.x.0", old_arg="new_arg") def myfunc(new_arg): ... - Parameters:
- depr_version – The quantify-scheduler version in which the parameter names will be removed. 
- aliases – Parameter name aliases provided as - old="new".
 
- Returns:
- The same function or method, that raises a FutureWarning if a deprecated argument is passed, or a TypeError if both the new and the deprecated arguments are passed.