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

PC-1294: Update Django version #415

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

samyou-softwire
Copy link
Contributor

Link to Jira ticket

Description

updates django to 5.1 & django-gov-notify to 0.5.0

makes upgrades, both mentioned in https://docs.djangoproject.com/en/5.1/releases/5.0/#features-removed-in-5-0:

  • USE_L10N is no longer used, so is removed
  • pytz package is no longer used, preferring python core packages

have tried frontdoor and portal, no issues found

Checklist

  • I have made any necessary updates to the documentation
  • I have checked there are no unnecessary IDE warnings in this PR
  • I have checked there are no unintentional line ending changes
  • I have added tests where applicable
  • If I have made any changes to the code, I have used the IDE auto-formatter on it
  • If I have made any changes to Python files (even if not changing any content strings), I have run make extract-translations

Copy link
Contributor

@jdgage jdgage left a comment

Choose a reason for hiding this comment

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

Is there a ticket for bumping the Python version further? That can be unblocked once this is in.

pyproject.toml Outdated
@@ -20,7 +20,7 @@ testino = "0.3.9"
optional = true

[tool.poetry.group.deployment.dependencies]
django-gov-notify = "0.4.0"
django-gov-notify = "0.5.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a v0.6.0 as well - can we go to that?

Copy link
Contributor Author

@samyou-softwire samyou-softwire Dec 18, 2024

Choose a reason for hiding this comment

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

sure, by the looks of things it only changes version dependencies

pyproject.toml Outdated
@@ -33,7 +33,7 @@ python = "~3.11.9"
boto3 = "1.26.86"
botocore = "1.29.86"
debugpy = "1.6.7"
Django = "3.2.19"
Django = "5.1.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

5.1.5 is the latest by the looks of things: would prefer to go to the latest patch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could only find 5.1.4

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh right yes, they've got patch notes on the site for 5.1.5 but it's not actually released yet

pyproject.toml Outdated
Comment on lines 37 to 39
django-allauth = "0.54.0"
django-cors-headers = "4.0.0"
django-csp = "3.7"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be worth checking notes for all of these other Django-related packages to see if they support Django 5.x.

We're probably best off bumping all of them up to vLatest tbh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have done most of these, though to note:

  • the update for django-allauth seems to be breaking, would need some more research into how we interact with this library
  • django-use-email-as-username is now no longer actively maintained

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed in catchup to ensure django-allauth is compatible with django 5.0. backlog ticket to be raised for django-use-email-as-username

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have updated django-allauth to a version known to work with django 5.0. won't go any further as there are many breaking changes to consider https://docs.allauth.org/en/latest/release-notes/recent.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have added PC-1634, PC-1635 & PC-1636 to cover removing use email as username & implementing a package auditor across our services

requires adding a new middleware, as specified in 0.56.0 release notes https://docs.allauth.org/en/latest/release-notes/2023.html#id15

went as far as 0.58.2 for now, latest patch version after django 5.0 support was added in 0.58.0 https://docs.allauth.org/en/latest/release-notes/2023.html#id6
@samyou-softwire samyou-softwire force-pushed the PC-1294-update-django-version branch from 745a39b to 42bd80e Compare December 19, 2024 16:02
Copy link
Contributor

@jdgage jdgage left a comment

Choose a reason for hiding this comment

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

Looks good: checking we've got tickets for any follow-up upgrades, as discussed earlier?

@samyou-softwire samyou-softwire merged commit f87d8a3 into develop Dec 20, 2024
4 checks passed
@samyou-softwire samyou-softwire deleted the PC-1294-update-django-version branch December 20, 2024 10:26
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.

2 participants