diff options
| author | Simon Charette <charette.s@gmail.com> | 2019-11-15 16:20:07 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-18 14:06:51 +0100 |
| commit | 11e327a3ff84e16ceace13ea6ec408a93ca9e72c (patch) | |
| tree | 438e482ac75e6ae404920493a628eb00e7519e59 /docs | |
| parent | cbe4d6203ff2d702b63dae52adbe7a50830a5cbe (diff) | |
Fixed #30988 -- Deprecated the InvalidQuery exception.
It was barely documented without pointers at its defining location and
was abused to prevent misuse of the QuerySet field deferring feature.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/3.1.txt | 5 | ||||
| -rw-r--r-- | docs/topics/db/sql.txt | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index b2a21b12a9..044d35bfd5 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -39,6 +39,9 @@ details on these changes. * The undocumented usage of the :lookup:`isnull` lookup with non-boolean values as the right-hand side will no longer be allowed. +* The ``django.db.models.query_utils.InvalidQuery`` exception class will be + removed. + See the :ref:`Django 3.1 release notes <deprecated-features-3.1>` for more details on these changes. diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index a7c9caa31e..00d620b045 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -330,6 +330,11 @@ Miscellaneous * The undocumented usage of the :lookup:`isnull` lookup with non-boolean values as the right-hand side is deprecated, use ``True`` or ``False`` instead. +* The barely documented ``django.db.models.query_utils.InvalidQuery`` exception + class is deprecated in favor of + :class:`~django.core.exceptions.FieldDoesNotExist` and + :class:`~django.core.exceptions.FieldError`. + .. _removed-features-3.1: Features removed in 3.1 diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt index f0af7a4b44..355c7366ca 100644 --- a/docs/topics/db/sql.txt +++ b/docs/topics/db/sql.txt @@ -170,8 +170,9 @@ last names were both retrieved on demand when they were printed. There is only one field that you can't leave out - the primary key field. Django uses the primary key to identify model instances, so it -must always be included in a raw query. An ``InvalidQuery`` exception -will be raised if you forget to include the primary key. +must always be included in a raw query. A +:class:`~django.core.exceptions.FieldDoesNotExist` exception will be raised if +you forget to include the primary key. Adding annotations ------------------ |
