[Django] #29619: Raised FieldError's should include the field that caused the error

14 views
Skip to first unread message

Django

unread,
Jul 31, 2018, 4:45:23 PM7/31/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex | Owner: nobody
Hayes |
Type: | Status: new
Cleanup/optimization |
Component: Database | Version: 2.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Currently there are many places in
[https://github.com/django/django/blob/master/django/db/models/sql/compiler.py
django/db/models/sql/compiler.py] that raise a {{{FieldError}}} however
frustratingly the field that caused the error is not included.

I'm proposing that, where possible, all raised {{{FieldError}}}'s raised
should include, as part of the error message, the field that caused the
error.

--
Ticket URL: <https://code.djangoproject.com/ticket/29619>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 1, 2018, 12:13:01 AM8/1/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* version: 2.0 => master
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:1>

Django

unread,
Aug 6, 2018, 1:57:11 AM8/6/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jeff):

* owner: nobody => Jeff
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:2>

Django

unread,
Aug 7, 2018, 6:12:35 AM8/7/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by shreybatra):

Replying to [comment:2 Jeff]:
Hello Jeff, I may be able to help you in patching this. Will you continue
or could we work together?

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:3>

Django

unread,
Aug 10, 2018, 3:17:03 AM8/10/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jeff):

Hi Shrey, sorry for the delay in getting back to you. I would still be
happy to have you work on it with me if you are still interested.

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:4>

Django

unread,
Aug 15, 2018, 3:42:38 PM8/15/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/10284 PR] (some test coverage is
lacking)

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:5>

Django

unread,
Sep 8, 2018, 11:27:32 AM9/8/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Vishvajit Pathak):

Can I take this issue forward ? If yes then I would assign this issue to
myself and will add the test cases required.

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:6>

Django

unread,
Dec 27, 2018, 12:10:49 PM12/27/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

The new PR also requires adjustments.

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:7>

Django

unread,
Dec 30, 2018, 4:39:07 AM12/30/18
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:8>

Django

unread,
Feb 14, 2019, 6:58:37 PM2/14/19
to django-...@googlegroups.com
#29619: Raised FieldError's should include the field that caused the error
-------------------------------------+-------------------------------------
Reporter: Alex Hayes | Owner: Jeff
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"741ce81a426e4d0cd7581d98d3b8e3290f513f09" 741ce81]:
{{{
#!CommitTicketReference repository=""
revision="741ce81a426e4d0cd7581d98d3b8e3290f513f09"
Fixed #29619 -- Added field names to some FieldErrors.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29619#comment:9>

Reply all
Reply to author
Forward
0 new messages