python-social-auth icon indicating copy to clipboard operation
python-social-auth copied to clipboard

Django 1.9.0 Deprecation Warning

Open swainn opened this issue 10 years ago • 6 comments

I get the following deprecation warnings when starting the django development server with Python Social Auth app installed:

/usr/lib/tethys/local/lib/python2.7/site-packages/social/apps/django_app/urls.py:19: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got auth). Pass the callable instead. name='begin'),

/usr/lib/tethys/local/lib/python2.7/site-packages/social/apps/django_app/urls.py:21: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got complete). Pass the callable instead. name='complete'),

/usr/lib/tethys/local/lib/python2.7/site-packages/social/apps/django_app/urls.py:24: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got disconnect). Pass the callable instead. name='disconnect'),

/usr/lib/tethys/local/lib/python2.7/site-packages/social/apps/django_app/urls.py:26: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got disconnect). Pass the callable instead. .format(extra), 'disconnect', name='disconnect_individual'),

/usr/lib/tethys/local/lib/python2.7/site-packages/social/apps/django_app/urls.py:26: RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and will be removed in Django 1.10. Update your urlpatterns to be a list of django.conf.urls.url() instances instead. .format(extra), 'disconnect', name='disconnect_individual'),

swainn avatar Dec 14 '15 23:12 swainn

Yeah, me too. I think we will need to wait until the next update appears or changing that manually.

Edit:

I changed it myself.

If you are not downgrading, replace /pythonX.Y/site-packages/social/apps/django_app/urls.py

"""URLs module"""
    from django.conf import settings
    try:
        from django.conf.urls import patterns, url
    except ImportError:
        # Django < 1.4
        from django.conf.urls.defaults import patterns, url


    from social.utils import setting_name
    from social.apps.django_app import views


    extra = getattr(settings, setting_name('TRAILING_SLASH'), True) and '/' or ''


    urlpatterns = [
        # authentication / association
        url(r'^login/(?P<backend>[^/]+){0}$'.format(extra), views.auth, name='begin'),
        url(r'^complete/(?P<backend>[^/]+){0}$'.format(extra), views.complete, name='complete'),
        # disconnection
        url(r'^disconnect/(?P<backend>[^/]+){0}$'.format(extra), views.disconnect, name='disconnect'),
        url(r'^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+){0}$' .format(extra), views.disconnect, name='disconnect_individual'),
    ]

evcb avatar Dec 16 '15 17:12 evcb

+1

liminspace avatar Jan 05 '16 14:01 liminspace

Hi, Is this fixed in python-social-auth==0.2.13. I am still getting this error in this version

bemall avatar Jan 19 '16 03:01 bemall

I'm too :(

liminspace avatar Jan 25 '16 14:01 liminspace

v0.2.14 released with this fix.

omab avatar Jan 25 '16 15:01 omab

Thanks Omab.. I did pip install python-social-auth==0.2.14...and the warning was gone..It worked for me.

bryankimani avatar Apr 02 '16 08:04 bryankimani