Skip to content

Conversation

@afuetterer
Copy link
Member

@afuetterer afuetterer commented Oct 28, 2025

Description

Related issue: #742

Ref: https://docs.djangoproject.com/en/5.2/releases/5.2/

Tasks

  • bump django to 5.2.8, when that is released https://docs.djangoproject.com/en/5.2/releases/5.2.8/
  • remove changes to pytest deps (will get bumps from dependency update branch after rebase)
  • ruff step in pre-commit.ci fails, due to newer ruff version, will get fixed after rebase of 2.3.3 branch
  • tests against 3.10 and 3.13 in CI (will get included after rebase of 2.4.0 branch)
  • remove TODOs
  • remove changes to pre-commit config
  • discuss usage of error on RemovedInNextVersionWarning (future proofing)
  • squash commits
  • add note to changelog / release notes: Django 5.2 supports PostgreSQL 14 and higher. -> will be done later by @jochenklar

How has this been tested?

I created a PR in my fork, which successfully completed.

@afuetterer afuetterer added type:maintenance dependencies Pull requests that update a dependency file labels Oct 28, 2025
@afuetterer afuetterer marked this pull request as draft October 28, 2025 11:56
@afuetterer
Copy link
Member Author

I ran django-upgrade (with target version 5.2) to check for any possible upgrades. I included those here, e.g. path vs re_path, HTTP_REFERER vs referer. Is that alright or should that be an extra PR? It is not mandatory to upgrade those files.

What do you think?

@afuetterer

This comment was marked as resolved.

@afuetterer

This comment was marked as resolved.

@jochenklar
Copy link
Member

Nope, not for RDMO.

@afuetterer
Copy link
Member Author

@afuetterer afuetterer added this to the RDMO 3.0.0 milestone Oct 28, 2025
@afuetterer afuetterer linked an issue Oct 28, 2025 that may be closed by this pull request
@afuetterer afuetterer force-pushed the 742-django-5.2 branch 2 times, most recently from 6c6f9e3 to f4c7c9d Compare November 7, 2025 12:05
@afuetterer

This comment was marked as resolved.

@MyPyDavid

This comment was marked as resolved.

@afuetterer

This comment was marked as resolved.

@MyPyDavid
Copy link
Member

we will try this for the 2.5.0 release, @jochenklar

@MyPyDavid MyPyDavid self-assigned this Jan 8, 2026
@MyPyDavid MyPyDavid modified the milestones: RDMO 3.0.0, RDMO 2.5.0 Jan 8, 2026
@afuetterer

This comment was marked as resolved.

@MyPyDavid MyPyDavid changed the base branch from 3.0.0 to 2.5.0/release January 8, 2026 20:33
@MyPyDavid
Copy link
Member

Can I rebase to 2.5.0?

yes exactly, thanks! I've just changed the target branch to the 2.5.0/release and it looks already good in this PR right (only 4 commits)? You also want to continue with the implementations in this PR?

@afuetterer afuetterer force-pushed the 742-django-5.2 branch 2 times, most recently from d4bae55 to 57c17ab Compare January 9, 2026 08:51
@afuetterer
Copy link
Member Author

Rebased to 2.5.0/release branch.

@afuetterer
Copy link
Member Author

I removed upgrades done with django-upgrade. This can be added later.

PROJECT_CONTACT = True
PROJECT_CONTACT_RECIPIENTS = ['email@example.com']

# Ref: https://adamj.eu/tech/2023/12/07/django-fix-urlfield-assume-scheme-warnings
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

So there is a warning we need to suppress, even if we set it explicitly? This is a bit weird.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems so, sorry. If you remove this "hack", you get an error.

@afuetterer

This comment was marked as resolved.

@jochenklar

This comment was marked as resolved.

@afuetterer

This comment was marked as resolved.

@afuetterer
Copy link
Member Author

CI passed for 3.10 and 3.13, yay. Anybody wants to test on their servers with real world data?

@jochenklar
Copy link
Member

With 3.14 it almost works.

index 2c446d519..c9bcfee38 100644
--- a/rdmo/core/tests/test_utils.py
+++ b/rdmo/core/tests/test_utils.py
@@ -42,7 +42,7 @@ valid_date_strings = [
 ]

 invalid_date_strings = [
-    ("2025-02-31","day is out of range for month"),
+    ("2025-02-31","day 31 must be in range 1..28 for month 2 in year 2025"),
     ("2025-17-02", "month must be in 1..12"),
     ("99/99/9999", "Invalid date format"),
     ("abcd-ef-gh", "Invalid date format"),

I think @MyPyDavid added this test. Maybe we just get rid of the test for the string instead of checking for python versions.

@afuetterer
Copy link
Member Author

According to the discussion in #742, I did not include 3.14 in this PR.

@jochenklar
Copy link
Member

Alright, got it.

@afuetterer
Copy link
Member Author

What else needs to be addressed in this PR? Otherwise I will set it to ready for review, after squashing the commits.

@MyPyDavid
Copy link
Member

I checked it out and it looks good to me.
I've added now the fix for this failing test in python 3.14 (also didn't know that we are supporting that version :p)

I would approve it like this as well, you don't need to squash commits necessarily!

@afuetterer
Copy link
Member Author

I have commits with stupid messages dangling in this branch like "settings" and "warnings". Will clean that up.

How about the changelog stuff? Will this be done when finishing the release?

As I stated in the PR description this change would require admins to e.g. bump postgres to >= 14.

Upstream support for PostgreSQL 13 ends in November 2025. Django 5.2 supports PostgreSQL 14 and higher.
Ref: https://docs.djangoproject.com/en/5.2/releases/5.2/#dropped-support-for-postgresql-13

@afuetterer afuetterer marked this pull request as ready for review January 16, 2026 14:24
@jochenklar
Copy link
Member

Good point. I usually write the CHANGELOG in the end, to avoid merging/rebasing the file all the time. I will put it in my notes.

@afuetterer
Copy link
Member Author

Good point. I usually write the CHANGELOG in the end, to avoid merging/rebasing the file all the time. I will put it in my notes.

Excellent, as I said earlier, these are the django changelogs when bumping 4.2 to 5.2.

Copy link
Member

@jochenklar jochenklar left a comment

Choose a reason for hiding this comment

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

Awesome thanks!

Copy link
Member

@MyPyDavid MyPyDavid left a comment

Choose a reason for hiding this comment

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

thank you 🙏 for 5.2!

@afuetterer
Copy link
Member Author

Permission to merge?

@afuetterer
Copy link
Member Author

I don't want to interfere with your planning of 2.5.0. Can this be merged now or should features come first?

@jochenklar
Copy link
Member

Sorry, please merge!

@afuetterer afuetterer merged commit be74ad6 into rdmorganiser:2.5.0/release Jan 21, 2026
18 checks passed
@afuetterer afuetterer deleted the 742-django-5.2 branch January 21, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file type:maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Django to Version 5.2 LTS

3 participants