On Thu, Jun 10, 2010 at 9:05 PM, Plovarna <[email protected]> wrote: > Hello, > I recently migrated from Django 1.1.2 to 1.2.1. When I run my test now, I get > a lot of PendingDeprecationWarning messages in console during Installing > index "phase". For example: > > ... > Creating table basket_basketitem > Creating table accounts_userprofile > Creating table accounts_address > Creating table accounts_phone > Creating table registration_registrationprofile > Creating table page_page > Creating table page_pageimage > /Users/admin/projects/www/oska/lib/django/db/models/fields/subclassing.py:26: > PendingDeprecationWarning: db_type has been called without providing a > connection argument. > stacklevel=1) > Installing index for auth.Permission model > /Users/admin/projects/www/oska/lib/django/db/models/fields/subclassing.py:26: > PendingDeprecationWarning: db_type has been called without providing a > connection argument. > stacklevel=1) > /Users/admin/projects/www/oska/lib/django/db/models/fields/subclassing.py:26: > PendingDeprecationWarning: db_type has been called without providing a > connection argument. > stacklevel=1) > Installing index for auth.Group_permissions model > /Users/admin/projects/www/oska/lib/django/db/models/fields/subclassing.py:26: > PendingDeprecationWarning: db_type has been called without providing a > connection argument. > stacklevel=1) > /Users/admin/projects/www/oska/lib/django/db/models/fields/subclassing.py:26: > PendingDeprecationWarning: db_type has been called without providing a > connection argument. > stacklevel=1) > ... > > Does anybody know where this messages came from?
This is a detail that has been accidentally omitted from the release notes. In order to support multiple databases, a number of changes were made to the internals of field definitions. These changes split apart some methods to ensure that database-specific conversions are not performed until the database backend is actually known. The release notes contain details about changes to the get_db_prep_* family of methods [1]; the db_type() method should be included in the same description, but has been left out. I've logged a ticket for this problem (#13739). I'll update the documentation soon; apologies for the inconvenience. In your case, something in your code is making a call to db_type on a field, but that call isn't providing a connection argument. For backwards compatibility purposes, Django will use the default connection (which was the behavior in 1.1), but it also raises a warning, because in Django 1.5, the 'use default connection' behavior will be removed from the API. [1] http://docs.djangoproject.com/en/1.2/releases/1.2/#get-db-prep-methods-on-field Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en.

