Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

bug 1467520: bug 1467532: Resolve RemovedInDjango20Warnings #5089

Merged
merged 3 commits into from
Nov 20, 2018

Conversation

MatonAnthony
Copy link
Contributor

@MatonAnthony MatonAnthony commented Nov 11, 2018

To upgrade Kuma to Django 2.0, we need to address multiple warnings.

  • 15971ff fix the issues within our code.
  • f5b7815 updates django-allauth to a version which is Django 2.0 ready.
  • 377ab2d address an issue with the Docker build and introduce PYTHONWARNINGS=all for documentation purposes.

Next steps:

Remaining warnings:

After the django-ratelimit update, the remaining warnings are coming from django-tidings but will disappear automatically when we update to Django 2.0 (see: https://github.com/mozilla/django-tidings/blob/master/tidings/compat.py)

Personal opinion:

I am not sure it is worth waiting for a django-ratelimit release to merge this, but I believe we should take contact with the module maintainer to see if a release can be made.

@MatonAnthony MatonAnthony force-pushed the remove-django-warnings branch from 8ead5bf to 377ab2d Compare November 11, 2018 15:51
@jwhitlock
Copy link
Contributor

Please use bug 1467520.

Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MatonAnthony, this is a good step forward. It should not wait on django-ratelimit.

I think this should be a merge commit, and the commits should get the bug numbers:

  • is_authenticated - bug 1467520
  • django-allauth update - bug 1467532
  • Dockerfile change - I wouldn't make this change (I'd set it in my docker-compose.yml instead of the base image), but it can have bug 1467520 since it is commented out.

If you are uncomfortable with a rebase, I can do it.

@jwhitlock
Copy link
Contributor

Opened jsocol/django-ratelimit#154 to eliminate the warning.

- Update django-allauth to remove the warning about is_authenticated()
not being a function but a property in Django 2.0.

See https://django-allauth.readthedocs.io/en/latest/release-notes.html
- Document which value of PYTHONWARNINGS is needed to display the Python
warnings.
- Add `no-tty` on GPG command because it's creating issues otherwise.
@MatonAnthony MatonAnthony force-pushed the remove-django-warnings branch from 377ab2d to 81059de Compare November 18, 2018 15:46
@MatonAnthony MatonAnthony changed the title bug xxxx: Resolve RemovedInDjango20Warnings bug 1467520: bug 1467532: Resolve RemovedInDjango20Warnings Nov 18, 2018
@MatonAnthony
Copy link
Contributor Author

Sorry it took a while to fix the few nits.

I have no hard feelings about the Dockerfile change, but I didn't saw it documented anywhere and I felt like the Dockerfile itself was an appropriate place.

So if you want it gone, I can remove the commit.

Copy link
Contributor

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I take a second look, I see that this line is directly above the new one:

# disable this when preparing for Django upgrade
PYTHONWARNINGS=ignore \

I think it would be OK to have the alternate version in the file as well.

Thanks for the rebase, and thanks for tackling these warnings, @MatonAnthony!

@jwhitlock jwhitlock merged commit fb39bae into mdn:master Nov 20, 2018
jwhitlock added a commit to jwhitlock/kuma that referenced this pull request Nov 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants