saltstack/salt — pull request #7161 by cvrebert (2013-09-10 23:56:46+00:00)
Title: Add kwargs_warn_until() function

This adds a `salt.utils.kwargs_warn_until()` function to be used as an aid in deprecating and removing the unused `**kwargs` present in many places in Salt. These `**kwargs` are allowing some typo mistakes in SLS files (and other places) to be silently ignored, which is bad.

Example use:
```py
def some_state_function(user, flag, **kwargs):
kwargs_warn_until(kwargs, (0, 19)) # or whatever the applicable version is
# ...(doesn't use `kwargs`)...
```