Skip to content

Update Python, Django support matrix#647

Merged
stephenfin merged 5 commits into
mainfrom
enter-2026
Jun 6, 2026
Merged

Update Python, Django support matrix#647
stephenfin merged 5 commits into
mainfrom
enter-2026

Conversation

@stephenfin
Copy link
Copy Markdown
Member

@stephenfin stephenfin commented Jun 6, 2026

  • Bump all dependency versions
  • Migrate from psycopg2 to psycopg (v3)
  • Compress release notes for older stable branches
  • Pin DB versions in CI

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin stephenfin force-pushed the enter-2026 branch 2 times, most recently from 3953d69 to 870f90a Compare June 6, 2026 11:38
We also change our testing matrix so that we only test the upper and
lower bounds of supported Python releases. This should ease pressure on
CI somewhat. We also switch from the deprecated psycopg2 to psycopg
(which actually corresponds to v3 now).

Changes to the source were auto-generated with django-upgrade.

Signed-off-by: Stephen Finucane <stephen@that.guru>
psycopg (v3) strictly rejects NUL bytes (0x00) in PostgreSQL text
fields, unlike psycopg2 which handled them silently. Malformed emails
(such as the codec-null.mbox fuzz fixture in our test suite) contain NUL
bytes in headers and body content, causing DataError on insert.

Strip NUL bytes from all text fields before they reach the database.
This is safe for all fields:

* Headers are restricted to printable ASCII by RFC 5322 meaning NUL
  bytes there always indicate corruption

* Email body / commit message content is plain text so NUL bytes are
  equally invalid here

* Unified diffs should also never contain NUL bytes. Git uses their
  presence as the heuristic to classify a file as binary, at which point
  it either emits 'Binary files ... differ' or, with --binary, a
  base85-encoded binary patch, both of which are entirely printable
  ASCII. A legitimate patch produced by git format-patch will therefore
  never carry NUL bytes in the diff text itself.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Only run on pushes to main and stable branches.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Generated with:

  reno report --branch $branch --stop-at-branch-base --no-show-source

where $branch was the respective stable branch. This allows us to tag
and delete these old branches.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin stephenfin merged commit 60f8be6 into main Jun 6, 2026
8 of 11 checks passed
@stephenfin stephenfin deleted the enter-2026 branch June 6, 2026 11:59
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.

1 participant