From bc43ae7c13b903022ec1fcb4867f5f10d7f125d6 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Wed, 10 Mar 2021 16:09:05 +0100 Subject: [PATCH] Refs #31235 -- Improved assertQuerysetEqual() warning message with stacklevel=2. --- django/test/testcases.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/test/testcases.py b/django/test/testcases.py index 006e922fee..92f566b7b0 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1081,6 +1081,7 @@ class TransactionTestCase(SimpleTestCase): "on a queryset when compared to string values. Set an " "explicit 'transform' to silence this warning.", category=RemovedInDjango41Warning, + stacklevel=2, ) transform = repr items = qs