Re: [Django] #34803: Nested OuterRef crashes with AttributeError

17 views
Skip to first unread message

Django

unread,
Aug 30, 2023, 9:27:49 AM8/30/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: nobody
Rigal |
Type: Bug | Status: new
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | 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 David Sanders):

@Simon I see what you're talking about now with defensive polymorphism!

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

Django

unread,
Aug 30, 2023, 12:29:56 PM8/30/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: nobody
Rigal |
Type: Bug | Status: new
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | 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 Simon Charette):

If anyone wants to take a shot at this one it should be straightforward.

Defining `OuterRef` and `ResolvedOuterRef.contains_over_clause = False`
like we did with `.contains_aggregate` in
2a431db0f5e91110b4fda05949de1f158a20ec5b and
ed6b14d4591e536985222b61cb8b83908d58140d for #28621.

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

Django

unread,
Aug 31, 2023, 2:00:33 AM8/31/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: willzhao
Rigal |
Type: Bug | Status: assigned

Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | 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 willzhao):

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


Comment:

willing to fix this issue.

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

Django

unread,
Aug 31, 2023, 10:36:05 PM8/31/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: willzhao
Rigal |
Type: Bug | Status: assigned
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | 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 willzhao):

* has_patch: 0 => 1


Comment:

PR see https://github.com/django/django/pull/17217

--
Ticket URL: <https://code.djangoproject.com/ticket/34803#comment:10>

Django

unread,
Sep 1, 2023, 5:17:34 AM9/1/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: willzhao
Rigal |
Type: Bug | Status: assigned
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/34803#comment:11>

Django

unread,
Sep 1, 2023, 5:24:57 AM9/1/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: willzhao
Rigal |
Type: Bug | Status: closed

Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"9cc0d7f7f85cecc3ad15bbc471fe6a08e4f515b6" 9cc0d7f]:
{{{
#!CommitTicketReference repository=""
revision="9cc0d7f7f85cecc3ad15bbc471fe6a08e4f515b6"
Fixed #34803 -- Fixed queryset crash when filtering againts deeply nested
OuterRef annotations.

Thanks Pierre-Nicolas Rigal for the report.

Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34803#comment:12>

Django

unread,
Sep 1, 2023, 5:25:38 AM9/1/23
to django-...@googlegroups.com
#34803: Nested OuterRef crashes with AttributeError
-------------------------------------+-------------------------------------
Reporter: Pierre-Nicolas | Owner: willzhao
Rigal |
Type: Bug | Status: closed
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"acfb42752259c3f920ffd20d6eef83b3c6f75cf7" acfb427]:
{{{
#!CommitTicketReference repository=""
revision="acfb42752259c3f920ffd20d6eef83b3c6f75cf7"
[4.2.x] Fixed #34803 -- Fixed queryset crash when filtering againts deeply
nested OuterRef annotations.

Thanks Pierre-Nicolas Rigal for the report.

Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.

Backport of 9cc0d7f7f85cecc3ad15bbc471fe6a08e4f515b6 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34803#comment:13>

Reply all
Reply to author
Forward
0 new messages