disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
746 stars 112 forks source link

DeprecationWarning for get_db_prep_save #20

Open LucasLemanowicz opened 12 years ago

LucasLemanowicz commented 12 years ago

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)
adamcharnock commented 12 years ago

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.

dcramer commented 12 years ago

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

schinckel commented 12 years ago

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

ogirardot commented 12 years ago

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 :)