Closed tom-dalton-fanduel closed 7 years ago
I wonder if the try/catch:
try:
from django.db.models import SubfieldBase
field_class = functools.partial(six.with_metaclass, SubfieldBase)
except ImportError:
field_class = functools.partial(six.with_metaclass, type)
could be replaced with a version check along the lines of:
# SubfieldBase causes RemovedInDjango110Warning in 1.8 and 1.9, and will not work in 1.10 or later
import django
if django.VERSION[:2] >= (1, 8):
field_class = functools.partial(six.with_metaclass, type)
else:
from django.db.models import SubfieldBase
field_class = functools.partial(six.with_metaclass, SubfieldBase)
Having the same issue. It doesn't seem to be blocking anything, but it'd be nice if it could be fixed. Especially since it apparently was back in October last year?
Created a PR with the proposed fix from above: #1008
The fix for this issue got merged into the social-app-django component.
Using 0.2.21 with Django 1.9, I get the following deprecation warning:
RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
It looks like this was originally a problem and was fixed by #813. However, it looks like recently the warning was reintroduced, by this:
https://github.com/omab/python-social-auth/commit/03ae00154900a8150a5bf941663425698aacdb6b#diff-25f350079af94bedfb90b3a9e8cafb59R15