On Fri, 2009-01-23 at 14:39 -0800, Nathaniel Whiteinge wrote: > Requesting a sanity check before I file a ticket. > > The API for directly accessing a database cursor() changes depending > on if DEBUG is True or False. (Excepting execute() and executemany().) > > This shell session spells it out more clearly: > http://dpaste.com/hold/112331/ > > Is this intentional?
*shrug* Probably that way in the interests of pragmatism. It's tricky to avoid without going through great contortions, in which case code cleanliness will trump the extreme edge-case of needing to access the very, very lowest layer cursor when we already provide connection.cursor() for that purpose and it suffices for the bulk of the cases. The DebugCursorWrapper has to wrap something at a slightly higher layer. If you can come up with a nice way to move it up the same level, a patch would be considered. This is "scratch your own itch country", though, since it's a three line utility function if you wanted to write a way to retrieve the raw low-level cursor given a connection.cursor() for the odd times you need access to that. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---