diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-31 15:22:00 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-31 15:22:00 -0400 |
| commit | 3c60d3b1ca492ba77d64111f0378892acaadf36b (patch) | |
| tree | 5e2df552a7142cd3bb2ef9e5236db85e5c2859f4 /lib/sqlalchemy/util/deprecations.py | |
| parent | 903b0a42e71c81ff99494352760c0f92fa7a486d (diff) | |
| download | sqlalchemy-3c60d3b1ca492ba77d64111f0378892acaadf36b.tar.gz | |
- A new style of warning can be emitted which will "filter" up to
N occurrences of a parameterized string. This allows parameterized
warnings that can refer to their arguments to be delivered a fixed
number of times until allowing Python warning filters to squelch them,
and prevents memory from growing unbounded within Python's
warning registries.
fixes #3178
Diffstat (limited to 'lib/sqlalchemy/util/deprecations.py')
| -rw-r--r-- | lib/sqlalchemy/util/deprecations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/util/deprecations.py b/lib/sqlalchemy/util/deprecations.py index d48efbaaa..124f304fc 100644 --- a/lib/sqlalchemy/util/deprecations.py +++ b/lib/sqlalchemy/util/deprecations.py @@ -102,7 +102,7 @@ def _decorate_with_warning(func, wtype, message, docstring_header=None): @decorator def warned(fn, *args, **kwargs): - warnings.warn(wtype(message), stacklevel=3) + warnings.warn(message, wtype, stacklevel=3) return fn(*args, **kwargs) doc = func.__doc__ is not None and func.__doc__ or '' |
