Bump django-tables2 from 2.7.0 to 3.0.0 - #38072
Conversation
Bumps [django-tables2](https://github.com/jieter/django-tables2) from 2.7.0 to 3.0.0. - [Changelog](https://github.com/jieter/django-tables2/blob/master/CHANGELOG.md) - [Commits](jieter/django-tables2@v2.7.0...v3.0.0) --- updated-dependencies: - dependency-name: django-tables2 dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
🔍 Dependency Analysis SummaryThis bump crosses a major boundary that renames the Overall risk: HIGH 📋 Detailed Changelog Reviewdjango-tables2 (2.7.0 → 3.0.0)2.9.0 was yanked upstream and re-cut as 3.0.0, so this really spans 2.7.1 → 3.0.0. Changes
Breaking Changes
Migration Notes Rename
|
| File | Lines | Issue |
|---|---|---|
hqwebapp/templates/hqwebapp/tables/header.html |
1 | {% load querystring from django_tables2 %} — fails at compile: 'querystring' is not a valid tag or filter in tag library 'django_tables2' |
hqwebapp/templates/hqwebapp/tables/header.html |
15, 16, 23 | without form |
hqwebapp/templates/hqwebapp/tables/header.html |
32, 33, 40 | dotted-kwarg form |
hqwebapp/templates/hqwebapp/tables/bootstrap5.html |
77, 95, 113 | dotted-kwarg form |
hqwebapp/templates/hqwebapp/tables/bootstrap5_htmx.html |
40, 41, 48, 49, 61, 62 | dotted-kwarg form |
header.html is the blast radius — it's the target of {% render_header %} in hq_tables_tags.py, which bootstrap5.html uses for {% block table.thead %}. Every table header render fails.
Affected Files — silent change (24 bare call sites, 16 templates)
hqwebapp/templates/hqwebapp/tables/bootstrap5_htmx.html:14,15,34data_cleaning/templates/data_cleaning/tables/bulk_edit_session.html:102,152,177;bulk_edit_session.html:45data_cleaning/.../modals/confirm_apply.html:10,confirm_undo.html:10,confirm_clear.html:10,confirm_select_all.html:12data_cleaning/.../status/in_progress.html:6,modal.html:22,previous_session.html:34,complete.html:33data_cleaning/.../columns/selection.html:5,selection_header.html:8,column_editable.html:56,94integration/templates/kyc/kyc_verify_report.html:55,68integration/templates/payments/payments_verify_report.html:57,69styleguide/.../bootstrap5/examples/htmx_pagination.html:34
Checked and clear
- No
RelatedLinkColumnusage. ✅ - No
DateColumn/DateTimeColumn/TimeColumnusage —hqwebapp/tables/columns.pydefinesDateTimeStringColumn(columns.Column)with a customrender(), so the ISO-export change doesn't affect HQ export output. ✅ django~=5.2.16andrequires-python = ">=3.13"are inside the supported matrix. ✅render_table,export_url,table_page_rangestill registered, sosingle_table.htmland the pagination ranges are otherwise fine. ✅- Upstream blocks HQ extends from
django_tables2/bootstrap5.html(table-wrapper,table,table.thead) still exist in 3.0.0, and upstream's ownquerystring_replacecalls sit in blocks HQ overrides. ✅
Test Impact
CI should catch the hard failures — corehq/apps/integration/payments/tests/test_views.py issues real self.client.get() calls against the payments verification table view, which renders bootstrap5_htmx.html → header.html. If those come back green, that's itself a signal the templates aren't rendered under test. The bare-call cases won't be caught; output just changes shape.
Two smaller things to re-verify: data_cleaning/columns.py SelectableHtmxColumn.render(self, value, bound_column, record) and integration/kyc/tables.py:23 DisableableCheckBoxColumn.render(self, value, record, bound_column) both rely on name-based argument dispatch, exactly the machinery the inspect.signature change touched; and EditableHtmxColumn.get_htmx_partial_response_context builds a BoundColumn by hand, while 2.7.1 changed when Column.accessor is set at bind time.
Configuration Changes: None. pyproject.toml leaves django-tables2 unpinned, so only uv.lock moves.
🛠️ Recommendations
Action Required (before merge)
hqwebapp/templates/hqwebapp/tables/header.html:1→{% load querystring_replace from django_tables2 %}- Replace
{% querystringwith{% querystring_replaceat all 39 call sites above. Every affected template already has{% load django_tables2 %}, so no other load lines change. Update the explanatory comment atstyleguide/.../examples/htmx_pagination.html:33, which names the tag.
Prefer the mechanical rename over letting bare calls fall through to the built-in — it preserves current behavior exactly (including the "?" output) and avoids two near-identically-named tags behaving differently in one codebase. Alternative: register a querystring shim in hqwebapp/templatetags/hq_tables_tags.py delegating to querystring_replace (one file instead of 39 edits), but that reintroduces the shadowing this release set out to remove.
Testing Focus
- Data Cleaning bulk edit: table render, pagination, sorting, inline cell edit, all confirm modals.
- KYC and Payments verification reports: sorting, pagination, per-page selector.
- Styleguide HTMX pagination example.
- HTMX partials specifically —
hx-replace-urlvalues and the URL pushed after sort/page changes. TableExportMixinexports (as_values()) for tables using aTemplateColumn, sinceTemplateColumnrequest handling changed in 2.8.0 while the export path builds its ownContext({"exporting": True}).
Follow-up Tasks
- Add a rendering test for
hqwebapp/tables/header.html(sortable/non-sortable x HTMX/non-HTMX link modes). It has no direct coverage today, which is why a rename this disruptive isn't guaranteed to fail loudly. TemplateColumn's new callableextra_contextandcontext_object_namecould simplifydata_cleaning/columns.pylater.
Merge Recommendation: HOLD — until the template migration lands with the lock bump.
Bumps django-tables2 from 2.7.0 to 3.0.0.
Changelog
Sourced from django-tables2's changelog.
Commits
bae55f2Prepare release 3.0.0a2869f3Remove declared support for Django 4.2 and 5.1, upgrade pre-commit dependenci...171d890Restore signature of TemplateColumn.render() (#1033)ba66a7fPrepare releasing version 2.9.0aa62684Document merging #1027, #93185f1050Add optionalcontext_object_nametoTemplateColumnand make `extra_contex...99fa419Use string annotation_format in inspect.signature to prevent runtime errors w...82451a9Bump actions/cache from 5.0.1 to 5.0.4 (#1028)b1c08a3Update changelog after merging #1016, #1022, #1021c4aff9bRename querystring templatetag to querystring_replace (#1021)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)