Deprecate assertQueries() in favor of django_assert_queries.
Review Request #14335 — Created Feb. 6, 2025 and updated
A while back, we split out
TestCase.assertQueries()
,
djblets.db.query_catcher
, anddjblets.db.query_comparator
into an
independent package,django_assert_queries
, making these assertions
available outside of projects consuming Djblets.Until now, the code was the same between the two, but advancements have
since been made in that project. Given that, we're no longer shipping a
separate copy, and instead recommending that package instead.This will go through a standard deprecation period. We now depend on
django_assert_queries
and re-export the appropriate modules for
compatibility purposes.
TestCase.assertQueries()
will continue to work, with a deprecation
warning. All new code should use
django_assert_queries.assert_queries()
instead. In time, that will
allow us to remove this as a hard dependency of Djblets, and keep it a
development-time dependency.
Unit tests pass in Djblets and Review Board.