Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1358 closed defect (fixed)

Python 2.3 incompatibility in magic-removal

Reported by: Christopher Lenz <cmlenz@…> Owned by: Adrian Holovaty
Component: Metasystem Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Python 2.3 doesn't have generator expressions, so we need to use list comprehension instead:

Index: django/db/models/
--- django/db/models/   (revision 2307)
+++ django/db/models/   (working copy)
@@ -790,7 +790,7 @@
             cursor.execute("DELETE FROM %s WHERE %s IN (%s)" % \
                     backend.quote_name(cls._meta.object_name.lower() + '_id'),
-                    ','.join('%s' for pk in pk_list)), 
+                    ','.join(['%s' for pk in pk_list])), 
         for f in cls._meta.many_to_many:
             cursor.execute("DELETE FROM %s WHERE %s IN (%s)" % \

Change History (1)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2308]) magic-removal: Fixed #1358 -- Fixed Python 2.3 incompatibility in django.db.models.query. Thanks, Christopher Lenz

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