On Tue, Jan 20, 2009 at 2:02 AM, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > > On Tue, 2009-01-20 at 01:54 -0300, Leo Soto M. wrote: > [...] >> So I've uploaded a small patch on #10071[4] which does the >> normalization to int instead of unicode. I tested it with sqlite >> (which was the problematic backend) and it doesn't break any test. >> >> Now, my questions are: >> >> - Is this change OK or would it be considered as backwards >> incompatible for slightly changing the interface with DB backends? On >> the pragmatic side I'd like to point that this doesn't break anything >> on the built-in backends but it would be good get confirmation from >> other external backend developers. > > That area of the code was really problematic just before 1.0. I'll dig > through my memory and read the changes around that time to try and > remember what the tricks were, but I have a recollection we tried to > initially go directly to ints and something or other didn't work > (something form or admin related).
I spent around an hour digging in the history of that code, and come to the following reasoning: the problems were caused by two mismatches between what the backend expected and what it got: - After the get_db_prep_* refactoring, backend expected int, but the admin passed unicode. This caused #8424. - The fix for #8424 was to expect unicode on the backend. But most usages passed an int. Caused #8510. - The fix for #8510 was to normalize everything to unicode. Both sides talk happily now :) So, this little change is based on keep both sides synchronized but with a better contract. However, people who can remember the actual facts may be able to confirm or correct my reasoning. >> - If the change is OK, could it make it into the 1.0.X branch? That'd >> be very good, as we are targeting Django 1.0 on the django-jython >> project. > > I'd call it a bug fix for that reason. Jython support on 1.0 is/was one > of our goals. > > Has something changed that made this only show up now? Or has it always > been there and you just didn't notice? It has always been there. Regards, -- Leo Soto M. http://blog.leosoto.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---