Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Tim Graham):

 Maybe the bugfix is to change the search behavior to use the
 `filter_q_behavior` approach. Does it break any existing tests? Can you
 add a new test to show that it corrects the query for spanning relations?

 You can try bumping [https://groups.google.com/d/topic/django-
 developers/dpL5z1yOe58/discussion the thread on the mailing list] if you
 need more guidance. I'm employed to review patches, but besides that,
 Django is a volunteer-driven project, so there's no escalation process.
 Some of the people who worked on the ORM are no longer active
 contributors.

-- 
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/065.92069d380a8e99adcbe23b3a93722beb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by steve yeago):

 Yeah, with more robust approaches you get both bugs solved and new
 features. Perhaps you could elaborate more about what kind of patch you
 are hoping to see? One where filterspec objects filter upon objects and
 return them, but that somehow doesn't chain ORs? That is fundamentally not
 how chained querying works in django. If you're arguing that some kind of
 hackery on the filtered queryset to merge the joins is more preferable,
 then please say so. I don't really think you understand the parameters of
 this problem. If you could help escalate this issue to someone with some
 knowledge of the plumbing at play here I would very much appreciate it.
 Maybe they could chime in with something useful and we could push this
 very crucial and old problem (which I have been contending with for 9
 years through maintained forks) forward.

-- 
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/065.84a3a7c316f8a158e39e6a386c281281%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Tim Graham):

 I see [https://github.com/django/django/pull/7345 PR 7345], did I miss
 something else? My understanding is that patch adds a new feature rather
 than corrects the existing behavior.

-- 
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/065.5b706cd034ade6ffac2188bad0fd4670%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by steve yeago):

 The ticket was opened with a patch that evaluated that approach.

-- 
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/065.343b754b4f1e6092c59a0108e042bf99%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Tim Graham):

 Actually it looks like Connor seconded treating the current behavior as a
 bug, so I think the next step would be to provide a patch for evaluating
 that approach.

-- 
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/065.87ee678dca362729a6f1e4249eeafa04%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by steve yeago):

 Who are you waiting for a response from? I called it a bug long ago.

-- 
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/065.d525109fde1cabbb2ed609e4d21b2303%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Tim Graham):

 I'm not sure what you're hoping to accomplish with that comment. Its
 meaning is vague and doesn't seem constructive. I haven't seen any
 responses to my suggestion in comment:21 to call the current behavior a
 bug and fix it. Perhaps it's a way to move forward.

-- 
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/065.ce8f76fd6567a8394c520a52819e751e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2017-07-06 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by steve yeago):

 Its pretty disappointing that all discussion on a ticket with a patch
 stops simply because a long-time contributor with some vague alternative
 assertions about how to approach the problem can't handle feedback.

-- 
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/065.46dae9b91e617ea3cead23f1a038a6f1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2016-11-07 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Ryan P Kilby):

 * cc: rpkilby@… (added)


--
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/065.cc2c6187d0fe4ef4957148d1f181c97d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters

2016-10-25 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Connor Osborn):

 I filed a ticket [https://code.djangoproject.com/ticket/27388], for this
 same issue because Dango Rest Framework depended on the api of chaining
 filters as an AND. As Josh Smeaton pointed out chained filters are
 logically OR'd statements. I think this is so counter to intuition that it
 is reasonable to break backwards compatibility in an upcoming release. I
 think the current api is likely to cause more pain in the future than the
 pain that would be caused by breaking existing code. If a function gets
 passed a queryset it cannot assume that it can call filter and gather the
 results, because of the nature of OR, it will include more than desired if
 another filter had been previously applied. Perhaps most importantly,
 applying multiple joins for the purpose of ORing can lead to exponentially
 slow queries, because successive joins can have multiplicative factors on
 the number of rows. This was the original reason I filed the ticket, the
 successive joins resulted in a search of 1million rows for a table with
 originally several thousand.

 > I think I understand the point you're trying to make Steve. Do the docs
 here represent the different behaviours you're trying to put across?
 https://docs.djangoproject.com/en/1.10/topics/db/queries/#spanning-multi-
 valued-relationships
 >
 > Those docs primarily refer to multi-value relationships which I'm not
 certain is the use case you're trying to resolve. But to summarise:
 >
 > `.filter(multi__value__lookup=1, multi__value__other=2)` is equivalent
 to `(MVL=1 AND MVO=2)` because the WHERE clause targets a single join.
 >
 > {{{
 > SELECT * FROM model
 > JOIN multi ON model.multi_id = multi.id
 > JOIN value on multi.value_id = value.id
 > WHERE value.MVL=1 AND value.MVO = 2
 > }}}
 >
 > Where `.filter(multi__value__lookup=1).filter(multi__value__other=2)` is
 logically equivalent to `(MVL=1 OR MVO=2)` because MVL and MVO have
 separate joins, so they can both match independently since it's a
 multivalue relationship.
 >
 > {{{
 > SELECT * FROM model
 > JOIN multi ON model.multi_id = multi.id
 > JOIN value on multi.value_id = value.id
 > JOIN multi m2 ON model.multi_id = m2.id
 > JOIN value v2 on multi.value_id = v2.id
 > WHERE value.MVL=1 AND v2.MVO = 2
 > }}}
 >
 > Does this correctly summarise the behaviour?

--
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/065.dd9c38dee0e795865ffcf44eee5ff121%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #27303: Selecting multiple admin list_filters across relations return results that don't match both filters (was: Allow FilterSpecs to return Q-likes)

2016-10-12 Thread Django
#27303: Selecting multiple admin list_filters across relations return results 
that
don't match both filters
---+
 Reporter:  Yeago  |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  1.10
 Severity:  Normal |   Resolution:
 Keywords:  filterspec | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

 * has_patch:  1 => 0
 * type:  New feature => Bug
 * stage:  Unreviewed => Accepted


--
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/065.ea2ec131fa660d5a427e51507db37965%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.