gargoyle icon indicating copy to clipboard operation
gargoyle copied to clipboard

DeprecationWarning for get_db_prep_save

Open LucasLemanowicz opened this issue 14 years ago • 4 comments

Getting the following DeprecationWarning notices when I run runserver on my Django 1.3 app with the latest version of Gargoyle installed (tried both through pip install and straight from github):

/usr/local/lib/python2.6/dist-packages/django/db/models/fields/subclassing.py:80: DeprecationWarning: A Field class whose get_db_prep_save method hasn't been updated to take a `connection` argument.
  new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
/usr/local/lib/python2.6/dist-packages/django/db/models/fields/subclassing.py:80: DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments.
  new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)

LucasLemanowicz avatar Aug 04 '11 00:08 LucasLemanowicz

I found this too. I tried to swap in a different django-jsonfield module only to realise that it is actually incompatible (wishful thinking I guess!). Although I realised that after I submitted this pull request.

The long and the short of it is that this looks to be caused by the original django-jsonfield and there is an issue for this already.

adamcharnock avatar Sep 14 '11 18:09 adamcharnock

I'm open to pulling JSONField into the repo if we cant get it resolved in the 3rd party package

dcramer avatar Sep 14 '11 19:09 dcramer

I have resolved this in my branch of django-jsonfield.

schinckel avatar Oct 20 '11 23:10 schinckel

i had this very same error using gargoyle with django 1.4 (as gargoyle is using django-jsonfield==0.6) Upgrading to django-jsonfield 0.8.5 seems to have resolved this, and makes (i'll keep this ticket in touch if anything happens) gargoyle compatible with django 1.4

Enjoy :)

ogirardot avatar Apr 21 '12 14:04 ogirardot