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

⬆️(backend) upgrade to Django 4.x (4.0, 4.1, <5) #2390

Merged
merged 3 commits into from May 14, 2024

Conversation

jonathanreveille
Copy link
Contributor

@jonathanreveille jonathanreveille commented May 3, 2024

Purpose

From Django version 3.2.25 to 4.0 :
The project was using Django 3.2.25, it now uses Django 4.0, this involved :

  • upgrading postgres image to version 12 (drop support for postgres < 12)
  • shift from pytz library to datetime.timezone instead.
  • updated the template tags {% ifequal %} in favor of {% if %}.
  • USE_L1ON is deprecated in settings if value is True

From Django 4.0 to 4.1 :

  • Update project.toml file to pin version to 4.1 of Django.
  • Adjust admin view tests

From Django 4.1 to 4.2:

  • Update project.toml file to pin version Django <5
  • Change staticfile settings constant in configuration file.
  • Dropped support for mysql < 8
  • Dropped circleci test-back-msql-5

Proposal

  • resources :
  1. https://docs.djangoproject.com/en/5.0/releases/4.0/
  2. https://docs.djangoproject.com/en/5.0/releases/4.1/
  3. https://docs.djangoproject.com/en/5.0/releases/4.2/

@jonathanreveille jonathanreveille self-assigned this May 6, 2024
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch 2 times, most recently from 2d32cb7 to 7e6c14f Compare May 6, 2024 15:23
@jonathanreveille jonathanreveille added the dependencies Dependency-related tasks. label May 6, 2024
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch 3 times, most recently from aedaaed to 24256ef Compare May 7, 2024 10:18
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch 10 times, most recently from 857ec2b to 7222768 Compare May 13, 2024 11:34
@jonathanreveille jonathanreveille changed the title ⬆️(backend) upgrade to Django 4.x (4.0, 4.1, 4.2) ⬆️(backend) upgrade to Django 4.x (4.0, 4.1, <5) May 13, 2024
@jonathanreveille jonathanreveille marked this pull request as draft May 13, 2024 12:33
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch 3 times, most recently from 87acfc9 to 50ac3f9 Compare May 13, 2024 13:58
@jonathanreveille jonathanreveille marked this pull request as ready for review May 13, 2024 13:59
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch from 50ac3f9 to 3866493 Compare May 13, 2024 14:08
Copy link
Member

Choose a reason for hiding this comment

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

You have a custom linter in the backend I think ^^

CHANGELOG.md Outdated Show resolved Hide resolved
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch from 3866493 to 22bf379 Compare May 13, 2024 15:10
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch from 22bf379 to 1ef8a63 Compare May 13, 2024 15:28
Copy link

@wilbrdt wilbrdt left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

sandbox/settings.py Outdated Show resolved Hide resolved
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch from b3272d1 to bb9829e Compare May 14, 2024 14:14
Since Django 4.0, the use of `pytz` is deprecated within Django
and is replaced by `zoneinfo` to use `datetime.timezone` instead.
We drop the support of postgres version less than 12. We have
also updated the template tags `{% ifequal %}` in favor of `{% if %}`
template tag. The setting configuration `USE_L10N` is deprecated
in the settings if the value is `True`.
Some admin view tests required some adjustments.
The count of strings in the admin template of Django
has changed from version 4 to 4.1 of Django.
Since Django 4.2, we have dropped the support of mysql < 8. We have
dropped the job on circleci for `test-back-mysql-5`. We have
updated in settings `STORAGES` configuration for staticfiles and
default file storage declaration.
@jonathanreveille jonathanreveille force-pushed the upgrade_django_version_dependency branch from bb9829e to 2f5902f Compare May 14, 2024 14:29
@jonathanreveille jonathanreveille merged commit 3ee5591 into master May 14, 2024
20 checks passed
@jonathanreveille jonathanreveille deleted the upgrade_django_version_dependency branch May 14, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependency-related tasks. improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants