#16937: Prefetch related objects
-------------------------------------+-------------------------------------
     Reporter:  lukeplant            |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Ready for
     Keywords:                       |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by akaariai):

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


Comment:

 {{{
 # in documentation
 [list(pizza.topppings.filter(spicy=True) for pizza in pizzas]
 }}}

 Note the tree 'p' characters and missing closing ')'. Fixed in attached
 patch.

 I am getting some deprecation warnings in tests:
 modeltests/prefetch_related/tests.py:172: DeprecationWarning:
 BaseException.message has been deprecated as of Python 2.6

 I have fixed this by using str(cm.exception) instead of
 cm.exception.message

 Otherwise I can't see anything wrong with the patch. Although there is
 still the issue with db_for_read hints, but I think that can be tackled
 later.

 All tests passed on sqlite3. PostgreSQL passes the prefetch_related test,
 I don't have time to run full test suite on PostgreSQL just now. I have
 read through the documentation changes and they look good. I haven't
 actually built the documentation, though.

 I have attached an updated patch which fixes the minor things mentioned
 above. Marking ready for checkin.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to