Howdy folks -- So it appears that the Django psycopg2 has a few issues that make it operate differently than any other of the db backends. There's a paste of the django test suite output at http://django.pastebin.com/ 778189 which shows 6 failures, but actually there's only two things wrong:
1. The psycopg2 backend returns strings as unicode objects instead of raw strings. So for example:: File "/Users/jacob/WO/code/brave-new-world/django.trunk/tests/ modeltests/custom_columns/models.py", line ?, in modeltests.custom_columns.models.__test__.API_TESTS Failed example: p.last_name Expected: 'Smith' Got: u'Smith' 2. The backend returns datetimes with attached timezone info instead of naieve datetimes:: File "/Users/jacob/WO/code/brave-new-world/django.trunk/tests/ modeltests/basic/models.py", line ?, in modeltests.basic.models.__test__.API_TESTS Failed example: Article.objects.get(id__exact=8).pub_date Expected: datetime.datetime(2005, 7, 31, 12, 30, 45) Got: datetime.datetime(2005, 7, 31, 12, 30, 45, tzinfo=<psycopg2.tz.FixedOffsetTimezone object at 0x17178f0>) Now, I know that both behaviors are actually more correct than the other backends, but these subtle differences between the psycopg2 adaptor and the other ones is really driving me nuts. Are the any objections to changing the psycopg2 backend to behave the same was as the other ones (knowing that it's actually a step backwards)? Eventually the right thing to do would be to make the *other* backends behave this way, but that's all caught up with unicodification, and I'd like to move towards consistency first, and then correctness when it's ready. Jacob --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---