Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2021-04-21 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"48e19bae49f271cccbb8a8f4549c9366b7cecac6" 48e19bae]:
 {{{
 #!CommitTicketReference repository=""
 revision="48e19bae49f271cccbb8a8f4549c9366b7cecac6"
 [3.2.x] Fixed #32650 -- Fixed handling subquery aliasing on queryset
 combination.

 This issue started manifesting itself when nesting a combined subquery
 relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but
 sql.Query.combine never properly handled subqueries outer refs in the
 first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
 (refs #27149).

 Thanks Raffaele Salmaso for the report.

 Backport of 6d0cbe42c3d382e5393d4af48185c546bb0ada1f from main
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a16695364969cc28efc174f6a218d74e%40djangoproject.com.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2021-04-21 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"6d0cbe42c3d382e5393d4af48185c546bb0ada1f" 6d0cbe42]:
 {{{
 #!CommitTicketReference repository=""
 revision="6d0cbe42c3d382e5393d4af48185c546bb0ada1f"
 Fixed #32650 -- Fixed handling subquery aliasing on queryset combination.

 This issue started manifesting itself when nesting a combined subquery
 relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but
 sql.Query.combine never properly handled subqueries outer refs in the
 first place, see QuerySetBitwiseOperationTests.test_subquery_aliases()
 (refs #27149).

 Thanks Raffaele Salmaso for the report.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d884363052a7310c69c4f279e3a60966%40djangoproject.com.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2019-04-15 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"c0969ee22741f15841a55b4420c113a9eac1c7a5" c0969ee]:
 {{{
 #!CommitTicketReference repository=""
 revision="c0969ee22741f15841a55b4420c113a9eac1c7a5"
 Refs #27149 -- Based recursive nested subquery detection on
 sys.getrecursionlimit().

 This makes sure the test_avoid_infinite_loop_on_too_many_subqueries test
 doesn't fail on systems with a non-default recursion limit.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c2731f2f1b984a2f933dc624ed41c365%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2019-03-21 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"3a505c70e7b228bf1212c067a8f38271ca86ce09" 3a505c7]:
 {{{
 #!CommitTicketReference repository=""
 revision="3a505c70e7b228bf1212c067a8f38271ca86ce09"
 Refs #27149, #29542 -- Simplified subquery parentheses wrapping logic.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.6150e250b9bad905d0505a7bfb4f96b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2019-03-21 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"35431298226165986ad07e91f9d3aca721ff38ec" 35431298]:
 {{{
 #!CommitTicketReference repository=""
 revision="35431298226165986ad07e91f9d3aca721ff38ec"
 Refs #27149 -- Moved subquery expression resolving to Query.

 This makes Subquery a thin wrapper over Query and makes sure it respects
 the Expression source expression API by accepting the same number of
 expressions as it returns. Refs #30188.

 It also makes OuterRef usable in Query without Subquery wrapping. This
 should allow Query's internals to more easily perform subquery push downs
 during split_exclude(). Refs #21703.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.87dc07fba02bc98224227ee1ef0465bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2019-03-21 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"96b6ad94d9ebbd57b77b44e185ee215b5b899ac8" 96b6ad9]:
 {{{
 #!CommitTicketReference repository=""
 revision="96b6ad94d9ebbd57b77b44e185ee215b5b899ac8"
 Refs #27149 -- Made Subquery store Query instead of Queryset.

 Subquery only uses Query.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.5416eaa1aa2c6641bebb6677356590c2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2017-01-14 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham ):

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


Comment:

 In [changeset:"236ebe94bfe24d394d5b49f4405da445550e8aa6" 236ebe94]:
 {{{
 #!CommitTicketReference repository=""
 revision="236ebe94bfe24d394d5b49f4405da445550e8aa6"
 Fixed #27149 -- Added Subquery and Exists database expressions.

 Thanks Josh Smeaton for Oracle fixes.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b3ad93328323b0938083dadf65538aca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2017-01-13 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Queryset SubQuery| Triage Stage:  Ready for
  Exists |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * needs_better_patch:  1 => 0
 * stage:  Accepted => Ready for checkin


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d9a720569d799fa43e3e5c5b4c2a3250%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter()

2016-11-17 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  Matthew
 |  Schinckel
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Queryset SubQuery| Triage Stage:  Accepted
  Exists |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Matthew Schinckel):

 * status:  new => assigned
 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1
 * owner:  nobody => Matthew Schinckel
 * keywords:  QuerySet.extra => Queryset SubQuery Exists


Comment:

 For what it's worth, I have a PR about this (thanks to whoever pointed
 this issue out).

 However, there is still one outstanding issue related to using
 .filter(foo__in=SubQuery(...))

 Feel free to jump in with suggestions about how to resolve it at
 https://github.com/django/django/pull/6478

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.583cb2c1c2295fc56141333a1061313a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27149: Allow using a subquery in QuerySet.filter() (was: Filtering with generic relation)

2016-09-02 Thread Django
#27149: Allow using a subquery in QuerySet.filter()
-+-
 Reporter:  MikiSoft |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  QuerySet.extra   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * stage:  Unreviewed => Accepted


Comment:

 A [https://github.com/django/django/pull/6478 PR] provides the ability to
 annotate with `SubQuery` and `Exists`. I think this is a bit different
 since it applies to `QuerySet.filter()` rather than `annotate()`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.bba4103563acf7864d43117c20bdb954%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.