Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » PendingDeprecationWarning during tests [RSS Feed]

#1 June 10, 2010 14:05:41

P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

PendingDeprecationWarning during tests


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?

Thank you
Regards
Micha;l

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 10, 2010 14:10:58

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

PendingDeprecationWarning during tests


On Thursday 10 June 2010 18:35:32 Plovarna wrote:
> Does anybody know where this messages came from?
>

looks like the new multidb syntax needed for your connection string in
settings.py
--
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 June 10, 2010 14:40:25

B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

PendingDeprecationWarning during tests


Yes, it seems but I don't know why -- I use new way for specifying DB
settings with DATATASES dictionary like:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'my_db',
'USER': 'my_user',
'PASSWORD': 'my_pass',
'HOST': 'localhost',
'PORT': ''
},
}


On 10 čvn, 15:12, Kenneth Gonsalves <law...@au-kbc.org> wrote:
> On Thursday 10 June 2010 18:35:32 Plovarna wrote:
>
> > Does anybody know where this messages came from?
>
> looks like the new multidb syntax needed for your connection string in
> settings.py
> --
> Regards
> Kenneth Gonsalves
> Senior Associate
> NRC-FOSS at AU-KBC

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 June 11, 2010 01:26:41

Russell K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

PendingDeprecationWarning during tests


On Thu, Jun 10, 2010 at 9:05 PM, Plovarna <mic...@plovarna.cz> 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 ; 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.

http://docs.djangoproject.com/en/1.2/releases/1.2/#get-db-prep-methods-on-fieldYours,
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 django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 June 11, 2010 08:02:40

B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

PendingDeprecationWarning during tests


Thank you very much to make it clear for me.

Regards
Michal

On 11 čvn, 02:26, Russell Keith-Magee <russ...@keith-magee.com> wrote:
> On Thu, Jun 10, 2010 at 9:05 PM, Plovarna <mic...@plovarna.cz> 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:2
> > 6: 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:2
> > 6: 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:2
> > 6: 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:2
> > 6: 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:2
> > 6: 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 ; 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.
>
> http://docs.djangoproject.com/en/1.2/releases/1.2/#get-db-prep-method...
>
> 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 django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » PendingDeprecationWarning during tests [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support