Skip to content

Upgrade application to Django 5.2 #12079

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

Open
humitos opened this issue Apr 3, 2025 · 5 comments · Fixed by #12104
Open

Upgrade application to Django 5.2 #12079

humitos opened this issue Apr 3, 2025 · 5 comments · Fixed by #12104
Assignees
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Apr 3, 2025

5.2 is out: https://docs.djangoproject.com/es/5.2/releases/5.2/

We want to plan and upgrade to the latest version.

There is a django upgrade script we have used already some time ago.

@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Apr 3, 2025
@humitos humitos self-assigned this Apr 3, 2025
@humitos
Copy link
Member Author

humitos commented Apr 3, 2025

Here is how we did the upgrade for 4.2: #10595

@humitos
Copy link
Member Author

humitos commented Apr 10, 2025

I gave this a try but it seems we can't upgrade yet because django-celery-beat does not support 5.2 yet. They are about to make a new release today: celery/django-celery-beat#853

Also, judging by the django-upgrade command, there are very small changes in our source code so, it shouldn't break anything I'd say🤷🏼

@humitos
Copy link
Member Author

humitos commented Apr 10, 2025

It seems we are able to upgrade django-storages as well: #11505

@humitos humitos moved this from Planned to In progress in 📍Roadmap Apr 14, 2025
@humitos humitos moved this from In progress to Needs review in 📍Roadmap Apr 16, 2025
humitos added a commit that referenced this issue Apr 24, 2025
Upgrade our code base to Django 5.2

- `django-safemigrate` had to be upgraded: you will find _a lot of_
changes like `Safe.before_deploy` -> `Safe.before_deploy()` (all of them
are in this particular commit: 4273e83)
- I had to borrow `django.core.files.storage.get_storage_class` because
it was deleted from Django 5.2
- `assertFormError` tests were updated to match the new signature
- `django-celery-beat` and `django-storages` were upgraded
- Update some old migrations referring to indexes to make them work

Closes #12079 
Closes #11505
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Apr 24, 2025
humitos added a commit to readthedocs/common that referenced this issue Apr 29, 2025
* Upgrade django-upgrade to latest version and Django 5.2

Related readthedocs/readthedocs.org#12079

* Version fix

* Fix addons PATHs on Docker Compose

* Upgrade all pre-commit hooks
@humitos
Copy link
Member Author

humitos commented Apr 29, 2025

I'm reopening it because we had to downgrade it again due to djstripe: #12145

@humitos humitos reopened this Apr 29, 2025
@github-project-automation github-project-automation bot moved this from Done to In progress in 📍Roadmap Apr 29, 2025
@humitos humitos moved this from In progress to Planned in 📍Roadmap Apr 29, 2025
@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Apr 30, 2025
humitos added a commit that referenced this issue Apr 30, 2025
humitos added a commit that referenced this issue Apr 30, 2025
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
Projects
Status: Planned
Development

Successfully merging a pull request may close this issue.

1 participant