api(deprecation): elaborate warning message for deprecated argument
@@ -40,5 +40,5 @@ def _rename_kwargs(func_name, kwargs, aliases):
if alias in kwargs:
if new in kwargs:
raise KeyError(f'{func_name} received both {alias} (deprecated) and {new} (recommended)')
- warnings.warn(f'{alias} is deprecated; use {new}', FutureWarning)
+ warnings.warn(f'The argument {alias} is deprecated; use {new} instead for {func_name}.', FutureWarning)
kwargs[new] = kwargs.pop(alias)
\ No newline at end of file
