Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#1297 closed defect (fixed)

[magic-removal] dict.update(**kwargs) not supported in Python 2.3

Reported by: Esaj Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Index: /usr/lib/python2.3/site-packages/django/db/models/
--- /usr/lib/python2.3/site-packages/django/db/models/  (revision 2185)
+++ /usr/lib/python2.3/site-packages/django/db/models/  (working copy)
@@ -245,7 +245,7 @@
     def filter(self, **kwargs):
         "Returns a new QuerySet instance with the args ANDed to the existing set."
         clone = self._clone()
-        clone._filters.update(**kwargs)
+        for k, v in kwargs.items(): clone._filters[k] = v
         return clone

     def select_related(self, true_or_false=True):

Attachments (1) (634 bytes) - added by Esaj 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by Esaj

Attachment: added

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2186]) magic-removal: Fixed #1297 -- Fixed Python 2.4 style dict.update() to Python 2.3-compatible

Note: See TracTickets for help on using tickets.
Back to Top