Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1297 closed defect (fixed)

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

Reported by: Esaj Owned by: adrian
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: UI/UX:


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 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by Esaj

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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