[Sqlalchemy-tickets] Issue #3178: overhaul warning use so that we can parameterize warnings (zzzeek
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-08-31 16:12:45
|
New issue 3178: overhaul warning use so that we can parameterize warnings https://bitbucket.org/zzzeek/sqlalchemy/issue/3178/overhaul-warning-use-so-that-we-can Mike Bayer: took 5 minutes to actually look at the warnings registry. Let's change our long standing approach of parameterized warnings, e.g. for unicode and other things where it really helps to see the value, and just go for no registry for these. We will augment warn() to accept *args that can be interpolated; if these are present, we skip the registry. Also, if we just re-implement warnings.warn(), we can do the stack frame stuff they are doing there anyway and express it in terms of the application outside of sqlalchemy without guessing on stacklevel. this applies to #2992 as well as we want to warn for textual strings and I'd really like to put the string in the warning. |