~roadmr/canonical-identity-provider/update-raven

« back to all changes in this revision

Viewing changes to src/identityprovider/forms.py

  • Committer: Ubuntu One Auto Copilot
  • Author(s): Daniel Manrique
  • Date: 2018-05-30 20:44:05 UTC
  • mfrom: (1633.1.26 fix-deprecation-warnings-3)
  • Revision ID: otto-copilot@canonical.com-20180530204405-dnj6rlkmn8feffjq
Fix most remaining Django and Python deprecation warnings in the sso codebase itself.

Some of the remaining ones probably need fixing in dependencies:
- django-statsd
- django-openid-auth
- django-piston
- django-honeypot
- raven
- preflight
- oauthlib

Other than the ones from dependencies, the remaining deprecation warnings are:

- most of the middlewares. RemovedInDjango20Warning: Old-style middleware using settings.MIDDLEWARE_CLASSES is deprecated. Update your middleware and use settings.MIDDLEWARE instead.
- identityprovider/models/twofactor.py:103: RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. Remove the parentheses to use it as an attribute. This needs updating django-openid-auth to make its is_authenticated method an attribute, to avoid ugly "is it callable?" logic in SSO itself.

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/fix-deprecation-warnings-3/+merge/347154

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
from django import forms
8
8
from django.conf import settings
9
 
from django.core.urlresolvers import reverse
10
9
from django.forms import Form, fields, widgets
 
10
from django.urls import reverse
11
11
from django.utils import translation
12
12
from django.utils.translation import ugettext_lazy as _
13
13
from gargoyle import gargoyle