On Mar 16, 2007, at 6:59 AM, King Simon-NFHD78 wrote:
> Unfortunately I don't know how to go about debugging this. I think I
> need to see exactly what is going on in the dependency sort. Do you
> have
> any suggestions for suitable places to add some extra logging?
>
these issues are often due to bugs in unitofwork.py and are
unbelievably tough to debug. which is why youre probably going to
have to get a test case for me since I really need to nail all of
these. if you want to turn on all logging available, youd say
logger.getLogger('sqlalchemy.orm').setLevel(logging.DEBUG), and youll
get a whole lot of stuff...after seeing all the logger names you can
tune out some of the noise with additional setLevel statements.
theres also a monkeypatch thats in the test suite which i use for
these, it intentionally reverses the order of topological sorts in
order to flush these out, it looks like:
from sqlalchemy.orm import unitofwork
from sqlalchemy import topological
class RevQueueDepSort(topological.QueueDependencySorter):
def __init__(self, tuples, allitems):
self.tuples = list(tuples)
self.allitems = list(allitems)
self.tuples.reverse()
self.allitems.reverse()
topological.QueueDependencySorter = RevQueueDepSort
unitofwork.DependencySorter = RevQueueDepSort
but when i get these, it takes me a few hours to wrap my head around
the issue, and im the one who wrote the code...so dont knock yourself
out on it...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---