Skip to content

Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama#1935

Merged
mxsasha merged 4 commits intomainfrom
ncsc2025upgrade
Mar 17, 2026
Merged

Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama#1935
mxsasha merged 4 commits intomainfrom
ncsc2025upgrade

Conversation

@mxsasha
Copy link
Copy Markdown
Collaborator

@mxsasha mxsasha commented Feb 19, 2026

Thinking we might not put this in 1.11.0, maybe 1.11.1, just to not make the release too huge. No merge for now. This requires the sslyze rewrite, legacy nassl does has difficulties on trixie. Therefore, this is on top of ncsc2025 branch.

Just wanted to upgrade Django to 5.2, snowballed a bit.

  • Django 4 LTS is ending soon, upgrade to 5.2 LTS
  • Django 5 no longer supports Python 3.9
  • Upgrade base image to Debian trixie to get 3.13
  • Upgrade all Python dependencies, also for 3.13 support.
  • Removed several pins to old versions.
  • Some minor code changes to account for removed Python
    APIs and other changes.
  • Change dev and docker generated version number to meet new requirements
  • Flake8 appears abandoned and isn't compatible, replace with pylama, minor format changes

3.13 has support for another 3 years. 3.10 is about to end, 3.9 had already ended. Django 5.2 is supported for 2 years.

@mxsasha mxsasha changed the title ncsc2025upgrade Upgrade to Django 5, Debian Trixie base image, Python3.13 Feb 19, 2026
@mxsasha mxsasha force-pushed the ncsc2025upgrade branch 4 times, most recently from 937bcea to fa82d92 Compare February 20, 2026 11:24
@mxsasha mxsasha changed the title Upgrade to Django 5, Debian Trixie base image, Python3.13 Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama Feb 20, 2026
@mxsasha mxsasha changed the title Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama [DO NOT MERGE] Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama Feb 20, 2026
@mxsasha mxsasha requested a review from aequitas February 20, 2026 11:46
@mxsasha mxsasha marked this pull request as draft February 24, 2026 10:07
Copy link
Copy Markdown
Collaborator

@aequitas aequitas 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. We might make the step to a pyproject.toml file and a uv.lock file to fully use uv and drop using the Debian system provided Python. I don't know if that is something you want in this PR already, but then we can drop the UV_SYSTEM_PYTHON and UV_BREAK_SYSTEM_PACKAGES and just manage the python version from pyproject.toml.

@mxsasha
Copy link
Copy Markdown
Collaborator Author

mxsasha commented Feb 24, 2026

Looks good. We might make the step to a pyproject.toml file and a uv.lock file to fully use uv and drop using the Debian system provided Python. I don't know if that is something you want in this PR already, but then we can drop the UV_SYSTEM_PYTHON and UV_BREAK_SYSTEM_PACKAGES and just manage the python version from pyproject.toml.

Let's include it, we're changing so many packages anyways.

@mxsasha mxsasha force-pushed the ncsc2025 branch 4 times, most recently from dbd8b27 to fcfd9bf Compare February 26, 2026 18:38
@mxsasha mxsasha force-pushed the ncsc2025 branch 9 times, most recently from 3301948 to 6249526 Compare March 10, 2026 15:16
Base automatically changed from ncsc2025 to main March 10, 2026 16:06
mxsasha added 2 commits March 17, 2026 13:31
- Django 4 LTS is ending soon, upgrade to 5.2 LTS
- Django 5 no longer supports Python 3.9
- Upgrade base image to Debian trixie to get 3.13
- Upgrade all Python dependencies, also for 3.13 support.
- Some minor code changes to account for removed Python
  APIs and other changes.
- Change dev version number to meet new requirements

This requires the sslyze rewrite, old nassl does has
difficulties on trixie.
Pylama has a PR for Python 3.12+ open for 2 years
This includes a few code changes due to small style variances.
@mxsasha mxsasha marked this pull request as ready for review March 17, 2026 12:31
@mxsasha mxsasha changed the title [DO NOT MERGE] Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama Upgrade to Django 5, Trixie base image, Python3.13, all deps, pylama Mar 17, 2026
@mxsasha mxsasha merged commit 4c5da8d into main Mar 17, 2026
13 checks passed
@mxsasha mxsasha deleted the ncsc2025upgrade branch March 17, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants