Skip to content

Upgrade Django to 2.2 #5058

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

Closed
humitos opened this issue Jan 2, 2019 · 8 comments · Fixed by #6494
Closed

Upgrade Django to 2.2 #5058

humitos opened this issue Jan 2, 2019 · 8 comments · Fixed by #6494
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Priority: low Low priority
Milestone

Comments

@humitos
Copy link
Member

humitos commented Jan 2, 2019

Django 2.2 LTS is scheduled to be released on April, 2019: https://www.djangoproject.com/download/#supported-versions

This is a meta issue to comment here all the things that need to be changed or considered before this date to start the migration in a smooth way.

We are currently using Django 1.11 LTS which its support ends on (at least) April, 2020.

@humitos humitos added Improvement Minor improvement to code Status: blocked Issue is blocked on another issue Accepted Accepted issue on our roadmap labels Jan 2, 2019
@humitos humitos added this to the Refactoring milestone Jan 2, 2019
@davidfischer
Copy link
Contributor

Thanks for creating this. I also wanted to mention that I'm +1 on only taking LTS releases of Django going forward.

@humitos humitos added the Priority: low Low priority label Jan 3, 2019
@dojutsu-user
Copy link
Member

dojutsu-user commented Jan 3, 2019

@humitos
This will be huge 🎉
Here is a non-exhaustive list of deprecated things:

  • django.utils.functional.allow_lazy is removed (ref) Remove deprecated code #5341
  • ForeignKey requires on_delete parameter.
  • AutoOneToOneField from django-annoying required on_delete parameter.
  • Currently, we are using version 1.1.0 of django-filters, it needs to be updated to 2.0.0.
  • This line Remove deprecated code #5341
    url(r'^admin/', include(admin.site.urls))
    needs to be changed to this:
    url(r'^admin/', admin.site.urls)
  • Resolve these two clashes:
    builds.Version: (auth.E005) The permission codenamed 'view_version' clashes with a builtin permission for model 'builds.Version'.
    
    projects.Project: (auth.E005) The permission codenamed 'view_project' clashes with a builtin permission for model 'projects.Project'.
    

@agjohnson
Copy link
Contributor

We'll need to ease into this one. We have a separate code base for our commercial hosting to consider as well.

Thanks for compiling the information @dojutsu-user, that's really helpful.

I'm going to target this a few versions out, it's not a huge priority seeming we are still getting over just upgrading to the current LTS.

@humitos
Copy link
Member Author

humitos commented Apr 27, 2019

Django 2.2 is already released. This issue is not blocked anymore. It would be good to receive contributions for this migration.

We have a separate code base for our commercial hosting to consider as well.

I suppose the changes there won't be too many considering the list of deprecated things.

@humitos humitos removed the Status: blocked Issue is blocked on another issue label Apr 27, 2019
@davidfischer
Copy link
Contributor

I suppose the changes there won't be too many considering the list of deprecated things.

Well, there will be a fair bit of changes and coordinating with the other repos will involve some challenges. For example, every single urls.py file will require changes. Every single models.py with a foreign key will require changes.

@stsewd
Copy link
Member

stsewd commented Apr 28, 2019

We also need to check if our dependencies support django 2.x

@dojutsu-user
Copy link
Member

It would be good to receive contributions for this migration.

Will definitely send PRs relating to this.

@davidfischer
Copy link
Contributor

Django 2.x added SESSION_COOKIE_SAMESITE and CSRF_COOKIE_SAMESITE. I believe no changes to our codeline are required as the default values are appropriate for us.

@davidfischer davidfischer pinned this issue Jul 31, 2019
@dojutsu-user dojutsu-user unpinned this issue Aug 1, 2019
@dojutsu-user dojutsu-user pinned this issue Aug 1, 2019
@stsewd stsewd unpinned this issue Sep 30, 2019
@stsewd stsewd pinned this issue Sep 30, 2019
@stsewd stsewd unpinned this issue Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Priority: low Low priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants