Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-08-15 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  fixed
 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 ):

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


Comment:

 In [changeset:"98bcdfa8bd902addd4b8cf37d039b3597d58a45c" 98bcdfa8]:
 {{{
 #!CommitTicketReference repository=""
 revision="98bcdfa8bd902addd4b8cf37d039b3597d58a45c"
 Fixed #25064 -- Allowed empty join columns.
 }}}

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-08-14 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (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 timgraham):

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


Comment:

 Marked RFC too soon as there is a test failure on Oracle.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-08-14 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   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 timgraham):

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-08-07 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (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 AlexHill):

 * needs_better_patch:  1 => 0


Comment:

 I've updated the example used in the tests which should hopefully clarify
 things a bit, and made the recommended style edits.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-12 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (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 AlexHill):

 Thanks. Fixed the tests in line with your feedback, rebased and squashed.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-11 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (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 akaariai):

 * needs_better_patch:  0 => 1


Comment:

 Patch to Join seems OK to me, but the tests need some improvement.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-11 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (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 akaariai):

 * stage:  Unreviewed => Accepted


Comment:

 I don't think this should be backpatched as this isn't an omission in a
 new feature (the Join type is completely internal, so its addition doesn't
 count as a new feature).

 Otherwise I don't see any harm in doing the changes.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-10 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by AlexHill):

 * has_patch:  0 => 1


Comment:

 Here's the patch and tests: https://github.com/django/django/pull/4978

 The patch is against master, but I would love to get this fixed in 1.8 and
 would be happy to backport it.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-06 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by AlexHill):

 Patch forthcoming – sorry, got pulled away before fleshing this out.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple

2015-07-06 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by timgraham):

 Is a patch forthcoming? If not, details on how to reproduce the issue will
 be helpful.

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


Re: [Django] #25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an empty tuple (was: Allow get_joining_columns to return empty tuple)

2015-07-05 Thread Django
#25064: Join.as_sql() emits invalid SQL if get_joining_columns() returns an 
empty
tuple
-+-
 Reporter:  AlexHill |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  1.8
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by AlexHill):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> If you override `get_joining_columns()` to return an empty tuple but
> provide extra conditions with `extra_join_restrictions()` ,
> `Join.as_sql()` creates invalid SQL.

New description:

 `Join.as_sql()` gets its join conditions from two places: the
 `get_joining_columns()` and `get_extra_restrictions()`.

 The SQL for extra restrictions is unconditionally prefixed with `AND`,
 which means invalid SQL is emitted if no joining columns are specified.
 The fix to make the `AND` conditional is a one-liner and allows users to
 override the default join conditions instead of adding to them.

--

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