Re: [Django] #24744: hstore lookup fails inside subquery

2015-06-02 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by coldmind):

 * cc: me@… (added)


Comment:

 So, as a conclusion, the goal is:
 * At first, to create testcase with fields->lookup/transform/expressions
 mapping
 * Fix problematic fields
 , right?

 I don't fully understand an idea of "A possible answer would be to have a
 TestCase mixin with many test_foo methods raising NotImplementedError", if
 you are proposing to create basic tests with declared mapping.
 Or this will be a basic testcase,  which will be used in different tests
 modules?

 After we will formalize plan, I want to take this ticket.

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


Re: [Django] #24744: hstore lookup fails inside subquery

2015-05-12 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by mjtamlyn):

 I would love a better list of all the things we should have (and generally
 a much more accurate set of lookup/transform/expression to field
 mappings). A possible answer would be to have a TestCase mixin with many
 `test_foo` methods raising `NotImplementedError`. We may also want a
 metaclass though to be able to explicitly remove `test_bar` where the
 feature `bar` does not apply, rather than skipping it. This would have the
 advantage that when you add a test to the base mixin for a new generic
 lookup/expression/whatever then it gets tested on all field types, and you
 see the ones it fails on (and on which dbs).

 AFAIK there are not `relabeled_clone` methods in `contrib.postgres` at
 present, so any `Transform` therein which takes args is potentially
 suspect.

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


Re: [Django] #24744: hstore lookup fails inside subquery

2015-05-05 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by jarshwah):

 > Any ideas how we could automate testing of expression-likes so that we
 automatically check relabeled_clone() support?

 I've had similar thoughts about when we introduce a new field. What are
 all the tests that should be written? I've got two ideas. The first would
 be a test code generator. The better idea would be a test case builder.
 I'm not sure how feasible either would be though.

 So far the "gold standard" for expression tests is in expressions_case. If
 we can generalise the tests there enough (or copy elsewhere then
 generalise), we might be able to create a list of expressions, and pass
 each one into the generalised test case to run through common failure
 scenarios. Not sure if this is practical though, considering the inputs
 and outputs to each expression can be wildly different.

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


Re: [Django] #24744: hstore lookup fails inside subquery

2015-05-04 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by akaariai):

 Seems like a case where KeyTransform will need a custom relabeled_clone
 method. We should check other new lookups, transforms and expressions to
 see if they contain this same bug.

 This is quite common bug, I have seen a variation of missing or broken
 relabeled_clone method a dozen times. The aliases of a query are not
 relabeled for normal queries, so normal testing doesn't spot these issues.
 The author needs to manually write a test for subquery support, and this
 is too easy to forget.

 Any ideas how we could automate testing of expression-likes so that we
 automatically check relabeled_clone() support? The optimal solution would
 be that whenever a new expression-like is introduced, we automatically
 test that for relabeled_clone(). But this needs some sort of magic
 autodetection, and I don't have any ideas how we could do this without
 ugly hacks.

 The alternate solution is to always test subquery support manually.

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


Re: [Django] #24744: hstore lookup fails inside subquery (was: hstore lookup inside subquery)

2015-05-04 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| 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):

 * severity:  Normal => Release blocker
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Reproduced with the attached test.

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


Re: [Django] #24744: hstore lookup fails inside subquery

2015-05-04 Thread Django
#24744: hstore lookup fails inside subquery
--+
 Reporter:  mrAdm |Owner:
 Type:  Bug   |   Status:  new
Component:  contrib.postgres  |  Version:  1.8
 Severity:  Release blocker   |   Resolution:
 Keywords:  hstore| 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):

 * Attachment "24744-test.diff" 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/063.997db359c151dcfecac3ce678dbdbd0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.