Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.11 upgrade #4750

Merged
merged 13 commits into from
Oct 23, 2018
Merged

Django 1.11 upgrade #4750

merged 13 commits into from
Oct 23, 2018

Conversation

davidfischer
Copy link
Contributor

  • Builds on Update to Django 1.10 #4319 but upgrades Django further to 1.11.16 (the latest LTS release)
  • Uses the tastypie upgrade from Update tastypie #4325.
  • Adds a data migration which sets unusable passwords for anybody with old password schemes. They will need to request a password reset. These users haven't logged in since RTD upgraded to Django 1.4.
  • Fixed a few minor test and lint failures due to changes in Django 1.11. There was a minor lint error due to the new template based widget rendering and Model.__init__ checking keyword values against known good values.

@davidfischer davidfischer requested a review from a team October 11, 2018 22:50
@davidfischer davidfischer mentioned this pull request Oct 11, 2018
5 tasks
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

A lot of changes in 1.11 but nothing breaking for our code! Changes look good for me, I'll test locally some projects next week.

I'm really excited for the update ⬆️ 🆙

@davidfischer
Copy link
Contributor Author

I should note that I have not yet extensively tested this. I ran the test suite, clicked around, and did a full local build but not much else.

@ericholscher
Copy link
Member

Running this locally and will see if I hit any issues. Builds are working though, so that's good :)

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Amazing!

All the changes look good to me. Although, I'd think that we need to block this until we have other repos also updated:

  • readthedocs-ops (probably the most important one --the setting name was changed)
  • readthedocs-corporate-ops
  • readthedocs-corporate
  • readthedocs-ext (already merged)

Changes in corporate are not required for this PR to get merged, but at least I think we can test how much it breaks and start upgrading it there also. Otherwise, we will be blocked in an old version of .org when deploying.

I will start with corporate and share how it goes.

def test_make_project(self):
"""Test that a superuser can use the API."""
def test_cant_make_project(self):
"""Test that a user can't use the API to create projects."""
Copy link
Member

Choose a reason for hiding this comment

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

You inverted the logic of the test here.

Don't we still need the test for testing that it's possible to use the API as super user to create a project?

Copy link
Member

Choose a reason for hiding this comment

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

We decided to remove the creation of a project using the api, it was never documented anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On this change specifically, there's more backstory in #4325.

@@ -126,7 +126,7 @@ def INSTALLED_APPS(self): # noqa
def USE_PROMOS(self): # noqa
return 'readthedocsext.donate' in self.INSTALLED_APPS

MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
Copy link
Member

Choose a reason for hiding this comment

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

This will require a change in -ops and -corporate-ops.

six==1.11.0
future==0.16.0

# django-tastypie 0.13.x and 0.14.0 are not compatible with our code
django-tastypie==0.13.0
# django-tastypie 0.14.0 drops support for django 1.9
Copy link
Member

Choose a reason for hiding this comment

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

If we are migrating to django 1.11 we may be possible to use 0.14.x here, I think.

@humitos
Copy link
Member

humitos commented Oct 12, 2018

I'm assuming that this PR closes #4174 #4319 #4325, right?

@humitos
Copy link
Member

humitos commented Oct 12, 2018

at least I think we can test how much it breaks and start upgrading it there also.

It doesn't break too much. I've already opened a PR on the corporate site and all tests are passing. First step done.

@stsewd
Copy link
Member

stsewd commented Oct 12, 2018

I'm assuming that this PR closes #4174 #4319 #4325, right?

Yup

This was referenced Oct 15, 2018
@ericholscher
Copy link
Member

Just deployed 2.7.2. Will now merge this, so we can get more testing by using it locally & in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants