Opened 18 years ago

Closed 18 years ago

Last modified 17 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

Description

Index: /usr/lib/python2.3/site-packages/django/db/models/query.py
===================================================================
--- /usr/lib/python2.3/site-packages/django/db/models/query.py  (revision 2185)
+++ /usr/lib/python2.3/site-packages/django/db/models/query.py  (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)

query.py.diff (634 bytes ) - added by Esaj 18 years ago.

Download all attachments as: .zip

Change History (2)

by Esaj, 18 years ago

Attachment: query.py.diff added

comment:1 by Adrian Holovaty, 18 years ago

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