Hi All,

I'm getting this warning:

SAWarning: Flushing object <Cancelled at 0x10b1b9d30> with incompatible polymorphic identity <Types.done: 'DONE'>; the object may not refresh and/or load correctly (this warning may be suppressed after 10 occurrences)
    (state_str(state), dict_[polymorphic_key]),

I know why: I'm changing the polymorphic type of a row, but this is intentional (it's handling a PUT to the entity the row represents) and I don't believe I'll hit refresh or load problems since once the transaction is committed, I'm done with the session.

So, two questions:

How can I indicate in my code that this is intentional and no warning should be omitted?

Why does the following warning filter not work?

warnings.filterwarnings("ignore", category=SADeprecationWarning)
warnings.filterwarnings("ignore", category=SAWarning)

The SADeprecationWarning filter *does* work (and is somewhat legit as they're coming from a third party library that's awaiting a fix), but the SAWarning doesn't catch the above.

cheers,

Chris

--
SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/04e4866e-6636-626c-c4f3-16e31849aad2%40withers.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to