diff options
Diffstat (limited to 'lib/sqlalchemy/util/deprecations.py')
| -rw-r--r-- | lib/sqlalchemy/util/deprecations.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/util/deprecations.py b/lib/sqlalchemy/util/deprecations.py index 532594b72..d9018a26d 100644 --- a/lib/sqlalchemy/util/deprecations.py +++ b/lib/sqlalchemy/util/deprecations.py @@ -73,7 +73,7 @@ def pending_deprecation(version, message=None, if message is None: message = "Call to deprecated function %(func)s" - + def decorate(fn): return _decorate_with_warning( fn, exc.SAPendingDeprecationWarning, @@ -87,13 +87,13 @@ def _sanitize_restructured_text(text): name += "()" return name return re.sub(r'\:(\w+)\:`~?\.?(.+?)`', repl, text) - - + + def _decorate_with_warning(func, wtype, message, docstring_header=None): """Wrap a function with a warnings.warn and augmented docstring.""" message = _sanitize_restructured_text(message) - + @decorator def warned(fn, *args, **kwargs): warnings.warn(wtype(message), stacklevel=3) |
