chore: Update test matrix - #398
Merged
Merged
Conversation
Django 6.1 changed the admin breadcrumbs from `<div class="breadcrumbs">`
to `<ol class="breadcrumbs">` with one `<li>` per crumb, and its selectors
in `admin/css/base.css` are element-qualified. The `{% block breadcrumbs %}`
override in `alias_usage.html` still emitted the old markup, so the
breadcrumbs matched no rule at all and rendered unstyled.
The block now switches on the Django version through a new
`{% django_version_gte %}` template tag: on 6.1+ it emits the list markup
with `aria-current="page"` on the last crumb and without the literal
`›` separators (6.1 generates them from `li::after`), and keeps the
old markup on 5.2/6.0.
Fixes #395
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Django main requires `asgiref>=3.12.1`, but the djmain lock files still
pinned 3.9.1 / 3.10.0, so `unit-tests-dev` failed to install before it
ever ran a test:
The conflict is caused by:
The user requested asgiref==3.9.1
django 6.2 depends on asgiref>=3.12.1
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Django 6.1 is released and is what #395 is about, but nothing in the matrix ran against it - the 6.1 code paths were only exercised by the `unit-tests-dev` jobs, whose test step is `continue-on-error`. Adds a `dj61` environment for Python 3.12-3.14 (Django 6.1 needs 3.12+), the matching lock files, and the trove classifier. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
django CMS 5.1 is released and supported (`django-cms>=5.0`), but the matrix only ever installed 5.0.x. Adds a `cms51` environment alongside `cms50` for every Django version in the matrix, the matching lock files, and the trove classifier. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
django CMS 5.1 now covers the full Python/Django matrix, so 5.0 only needs the two ends of it: py311-dj52 and py314-dj61. Drops the 16 lock files in between and takes the matrix from 36 to 24 environments. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Contributor
Reviewer's GuideUpdates the compatibility matrix to include Django 6.1 and django CMS 5.1, while introducing version-specific admin breadcrumb markup so alias usage pages remain correctly styled across supported Django versions; tests cover the new tag and rendering branches. Sequence diagram for version-specific admin breadcrumb renderingsequenceDiagram
participant Template as alias_usage.html
participant Tag as django_version_gte
participant Django as Django
Template->>Tag: django_version_gte(6, 1)
Tag->>Django: Read django.VERSION
Django-->>Tag: Version tuple
Tag-->>Template: True or False
alt Django 6.1 or newer
Template->>Template: Render ol.breadcrumbs
else Django older than 6.1
Template->>Template: Render div.breadcrumbs
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
#396 and #397 landed upstream in the meantime; #396 was merged before the matrix was trimmed. Resolved every conflict under tests/requirements/, tox.ini and compile.py in favour of this branch, so the trimmed matrix stands: django CMS 5.0 only at py311-dj52 and py314-dj61, django CMS 5.1 across the full Python/Django matrix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
django CMS 5.1 renders `Page.__str__` through `get_admin_content()`, which
reads `self.pagecontent_set(manager="admin_manager").latest_content()`. The
usage list prefetched `pagecontent_set` through the default manager, and a
prefetch lands in `_prefetched_objects_cache` under the relation name no
matter which manager asked for it - so that call got a plain queryset back
and blew up:
AttributeError: 'QuerySet' object has no attribute 'latest_content'
Prefetching `PageContent.admin_manager.latest_content()` instead keeps the
cache useful and gives django CMS the queryset API it expects.
`admin_manager` and `latest_content()` exist on django CMS 5.0 and 5.1,
with and without djangocms-versioning.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
Django 6.1 stores `Script` objects in `Media._js` instead of plain paths, so the substring check in the alias plugin media test raised `TypeError: argument of type 'Script' is not a container or iterable`. Asserting against the rendered media works on every supported version. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwNaBKq7MNLhibbjjiAYHM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Expand compatibility testing to django CMS 5.1 and maintain page usage and form media behavior across newer Django versions.
Bug Fixes:
Enhancements:
Build:
Tests:
Related resources
Checklist