Closed
Description
Migrated issue, originally created by Michael Bayer (@zzzeek)
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.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon Aug 31, 2014
Michael Bayer (@zzzeek) wrote:
looking to do it like this, will commit soon
if someone uses the "once" filter, there's a global dictionary out of our reach. so this is the only way to go.
there's not really any performant solution to the stack trace part of this, just going to leave that.
sqlalchemy-bot commentedon Aug 31, 2014
Michael Bayer (@zzzeek) wrote:
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 overhaul warning use so that we can parameterize warnings #3178
→ 3c60d3b
sqlalchemy-bot commentedon Aug 31, 2014
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Jan 18, 2015
Michael Bayer (@zzzeek) wrote:
sane multi rowcount (e.g. pyodbc) would fail on multirow update. add
a test that mocks this breakage into plain dialects
→ f49c367