Skip to content

Support Django 6.1 and Wagtail 8 - #88

Open
mlanser wants to merge 1 commit into
coderedcorp:mainfrom
mlanser:django-6.1-wagtail-8
Open

mlanser wants to merge 1 commit into
coderedcorp:mainfrom
mlanser:django-6.1-wagtail-8

Conversation

@mlanser

@mlanser mlanser commented Sep 13, 2026

Copy link
Copy Markdown

Django 6.1 removed django.utils.cache.cc_delim_re as part of the CVE-2026-48587 hardening (django/django@526b1b4), so wagtailcache.cache fails to import on 6.1:

ImportError: cannot import name 'cc_delim_re' from 'django.utils.cache'

Changes:

  • Split the Vary header with django.utils.http.split_header_value, with an equivalent fallback for Django < 6.1. It also strips whitespace around the first and last tokens, which the old regex did not, so a padded Cookie is now removed.
  • Allow wagtail<9.0; add the Wagtail 8 classifier and a py3.13_wag8 CI matrix entry.
  • New test test_vary_header_parse_whitespace.

Tested locally: 42 passed on Django 6.1.1 / Wagtail 8.0 (Python 3.14) and on Django 6.0.8 / Wagtail 7.4.3 (Python 3.13).

Django 6.1 removed django.utils.cache.cc_delim_re (CVE-2026-48587 hardening,
django/django@526b1b4), so importing wagtailcache.cache raises ImportError.
Split the Vary header with django.utils.http.split_header_value, falling back
to an equivalent local helper on Django < 6.1. Unlike the old regex, it strips
whitespace around the first and last tokens too, so a padded 'Cookie' is still
removed.

Allow wagtail<9.0 and add the Wagtail 8 classifier and CI matrix entry.
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