Skip to content

PT-1947: Upgrade to Django 5#435

Merged
mhieta merged 11 commits into
mainfrom
PT-1947/upgrade-to-django-5
Oct 9, 2025
Merged

PT-1947: Upgrade to Django 5#435
mhieta merged 11 commits into
mainfrom
PT-1947/upgrade-to-django-5

Conversation

@mhieta

@mhieta mhieta commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Details:

  • Bump Django 5.2 and requirements
  • Bump PostgreSQL 17
  • Update ruff rules
    • Use default ruff linting rules
    • Apply updated ruff formatting rules
    • Include migrations to ruff-config
    • Update to use lowercased function-level variables
    • Update to use snake-casing
    • Move dynamic getattr-calls to module level from function default parameters
    • Postfix exception-classes with 'Error'
  • Update syrupy snapshots
  • Update GDPR-tests
  • Update timezone-filtering to work with Django 5
  • Remove deprecated PickleSerializer

Refs: PT-1947

@mhieta mhieta force-pushed the PT-1947/upgrade-to-django-5 branch from 926f77c to ae4113d Compare October 8, 2025 14:25
@terovirtanen

Copy link
Copy Markdown
Contributor

KULTUS-API branch is deployed to platta: https://kultus-pr435.api.dev.hel.ninja 🚀🚀🚀

@mhieta mhieta force-pushed the PT-1947/upgrade-to-django-5 branch from ae4113d to 49d3b24 Compare October 9, 2025 05:53
@terovirtanen

Copy link
Copy Markdown
Contributor

KULTUS-API branch is deployed to platta: https://kultus-pr435.api.dev.hel.ninja 🚀🚀🚀

@mhieta mhieta marked this pull request as ready for review October 9, 2025 06:10
@mhieta mhieta requested a review from a team as a code owner October 9, 2025 06:10
Comment thread compose.yaml Outdated
Comment thread requirements-dev.txt Outdated
Comment thread verification_token/models.py Outdated

@charn charn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall looks good. 👍 While not completely part of this PR (but since you already touched the relevant lines) settings from verification_token should be moved properly to settings.py.

mhieta added 11 commits October 9, 2025 13:13
Details:
- Bump Django 5.2
- Bump all requirements to latest versions
- Switch to psycopg[c]
- Remove deprecated 'drf-oidc-auth'-package
- Remove django-csp version pin
- Remove ruff- and pre-commit-packages
- Remove outdated ruff and pre-commit-sync tests
- Add migration for organizations-module

Refs: PT-1947
Remove deprecated PickleSerializer from the session serialization
and use the default JSONSerializer.

Refs: PT-1947
Updates:
- Update to use lowercased function-level variables
- Update to use snake-casing
- Move dynamic getattr-calls to module level from
function default parameters
- Postfix exception-classes with 'Error'
- Move tzinfo-variable to module-level to reduce
excessive code duplication
- Update syrupy snapshots
- Update GDPR-tests

Refs: PT-1947
Django 5.2 dropped support for PostgreSQL 13.

Refs: PT-1947
Apply ruff formatting.

Refs: PT-1947
Apply updated ruff rules.

Refs: 1947
Django 5 requires a date for DST-calculations,
therefore use full datetime with timezone info.

Refs: PT-1947
Utilize verification token settings directly
from the standard 'settings'-module.

Add missing 'VERIFICATION_TOKEN_LENGTH'-setting
and update 'PERSONAL_DATA_RETENTION_PERIOD_MONTHS'-type.

Refs: PT-1947
@mhieta mhieta force-pushed the PT-1947/upgrade-to-django-5 branch from 49d3b24 to 25f6c4f Compare October 9, 2025 10:27
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2025

Copy link
Copy Markdown

@charn charn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 👍 :shipit:

@terovirtanen

Copy link
Copy Markdown
Contributor

KULTUS-API branch is deployed to platta: https://kultus-pr435.api.dev.hel.ninja 🚀🚀🚀

@mhieta mhieta merged commit 2484b23 into main Oct 9, 2025
22 checks passed
@mhieta mhieta deleted the PT-1947/upgrade-to-django-5 branch October 9, 2025 10:38
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.

3 participants