Update query catching and comparison for Django 4.2.

Review Request #13453 — Created Dec. 7, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

The new query catching and comparison code introduced in Djblets 3.4
wasn't quite compatible with Django 4.2, due to some changes in how some
queries and Q-expressions are built.

COUNT(*) queries are now generated slightly differently, with
different internals, affecting query expectations. This has been
updated in Djblets's tests, but this will impact consumers of query
comparison code outside of Djblets as well.

SQLite query syntax has changed for some operations, affecting Djblets
unit tests.

~Q(...) negated expressions are now represented differently
internally, using a NegatedExpression (a subclass of
ExpressionWrapper). These are now supported, serialized, represented,
and compared correctly.

Unit tests pass.

Commits

Files

    Loading...