SAWarning causes memory leak

20 views
Skip to first unread message

nekto0n

unread,
Jun 7, 2010, 9:09:27 AM6/7/10
to sqlalchemy
Hi there!
Interesting feature was discovered. When you supply queries with non-
unicode values you get this:
Unicode type received non-unicode bind param value
'ya37esbr24qhlu9kojf5z1x6m8gvinc0'

All warnings after being emitted go into the warning registry in order
to be able to ignore them in future. Registy is a dict, with key:
key = (text, category, lineno)

"text" is always different as you can see, so eventually - every
single warnings ends up being held in the registry, causing memory
leak. Wasn't sure if it's a bug or just nice feature - decided to
write here. Maybe it should be better to put 'value' somewhere else,
not in actual text?

Michael Bayer

unread,
Jun 7, 2010, 9:53:45 AM6/7/10
to sqlal...@googlegroups.com
wow that sucks does the warnings module document that ? we'd have to change that warning immediately.

> --
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To post to this group, send email to sqlal...@googlegroups.com.
> To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
>

nekto0n

unread,
Jun 8, 2010, 9:44:34 AM6/8/10
to sqlalchemy
warnings module documentation mentions that there's a registry, but
without any details...

nekto0n

unread,
Jun 9, 2010, 3:58:43 PM6/9/10
to sqlalchemy
To save some googling time. This message resulted in
http://www.sqlalchemy.org/trac/ticket/1822
Reply all
Reply to author
Forward
0 new messages