lp:~roadmr/canonical-identity-provider/upgrade-django-statsd

Created by Daniel Manrique on 2018-05-31 and last modified on 2018-05-31
Get this branch:
bzr branch lp:~roadmr/canonical-identity-provider/upgrade-django-statsd
Only Daniel Manrique can upload to this branch. If you are Daniel Manrique please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Daniel Manrique
Project:
Canonical SSO provider
Status:
Merged

Recent revisions

1639. By Daniel Manrique on 2018-05-31

Upgrade django-statsd-mozilla to 0.4.0

1638. By Daniel Manrique on 2018-05-30

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

1637. By Daniel Manrique on 2018-05-29

Fix unicode error when building account links using displayname with non-ascii characters and format_html.

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
  File "django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "django/core/handlers/base.py", line 217, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/base.py", line 215, in _get_response
    response = response.render()
  File "django/template/response.py", line 107, in render
    self.content = self.rendered_content
  File "django/template/response.py", line 84, in rendered_content
    content = template.render(context, self._request)
  File "django/template/backends/django.py", line 66, in render
    return self.template.render(context)
  File "django/template/base.py", line 207, in render
    return self._render(context)
  File "django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 177, in render
    return compiled_parent._render(context)
  File "django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 177, in render
    return compiled_parent._render(context)
  File "django/template/base.py", line 199, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 72, in render
    result = block.nodelist.render(context)
  File "django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 72, in render
    result = block.nodelist.render(context)
  File "django/template/base.py", line 990, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 957, in render_annotated
    return self.render(context)
  File "django/template/library.py", line 225, in render
    _dict = self.func(*resolved_args, **resolved_kwargs)
  File "django/contrib/admin/templatetags/admin_list.py", line 340, in result_list
    'results': list(results(cl))}
  File "django/contrib/admin/templatetags/admin_list.py", line 316, in results
    yield ResultList(None, items_for_result(cl, res, None))
  File "django/contrib/admin/templatetags/admin_list.py", line 307, in __init__
    super(ResultList, self).__init__(*items)
  File "django/contrib/admin/templatetags/admin_list.py", line 218, in items_for_result
    f, attr, value = lookup_field(field_name, result, cl.model_admin)
  File "django/contrib/admin/utils.py", line 295, in lookup_field
    value = attr(obj)
  File "identityprovider/admin.py", line 433, in account_link
    return build_account_link(obj.account)
  File "identityprovider/admin.py", line 63, in build_account_link
    account.openid_identifier)
  File "django/utils/html.py", line 94, in format_html
    return mark_safe(format_string.format(*args_safe, **kwargs_safe))

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/fix-email-oops/+merge/347072

1635. By Daniel Manrique on 2018-05-28

Fix PEP352-related deprecation warnings.

Most of these are not Django-related but they pop up when using -Wd (as required by newer Djangos to show deprecation warnings at all).

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/webservices-launchpad-pep352/+merge/346983

1634. By Daniel Manrique on 2018-05-25

Fix deprecation warnings concerning on_delete on model field definitions and migrations.

This fixes only such warnings in this project's code; some remain on django-piston and django-openid-auth, which will be tackled separately.

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

1633. By Colin Watson on 2018-05-23

Refer to terms of service and data privacy policy on www.ubuntu.com rather than locally.

Merged from https://code.launchpad.net/~cjwatson/canonical-identity-provider/central-terms/+merge/346765

1632. By Daniel Manrique on 2018-05-16

Fix location of custom Postgres config file.

The file should be in DATA_DIR, not in PGHOST directory. Thus,
the settings in this file were not really being applied.

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/wrong-location-psql-config/+merge/345628

1631. By Daniel Manrique on 2018-05-14

Add admin list action to suspend accounts.

This is handy if the account in question has e.g. thousands of e-mail addresses (grounds for suspension!) which makes the account change page unusable. With this, the suspend can be applied from the accounts list page.

Merged from https://code.launchpad.net/~roadmr/canonical-identity-provider/suspend-admin-action/+merge/345449

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:canonical-identity-provider/release
This branch contains Public information 
Everyone can see this information.

Subscribers