From 8b241f84e25f679c459393dab2947c8354eb01a9 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 19 Sep 2025 12:27:05 +0200 Subject: Fixed #36614 -- Deprecated QuerySet.values_list(flat=True) without a field. Thanks to Jacob Walls and Simon Charette for their input. co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> --- docs/internals/deprecation.txt | 3 ++- docs/releases/6.1.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index f2a6e9b545..2473d2b4f7 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -56,7 +56,8 @@ details on these changes. See the :ref:`Django 6.1 release notes ` for more details on these changes. -* ... +* Calling :meth:`.QuerySet.values_list` with ``flat=True`` and no field name + will raise ``TypeError``. .. _deprecation-removed-in-6.1: diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index 56a222f3e3..97a9d05d9d 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -262,7 +262,9 @@ Features deprecated in 6.1 Miscellaneous ------------- -* ... +* Calling :meth:`.QuerySet.values_list` with ``flat=True`` and no field name + is deprecated. Pass an explicit field name, like + ``values_list("pk", flat=True)``. Features removed in 6.1 ======================= -- cgit v1.3