Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#1358 closed defect (fixed)

Python 2.3 incompatibility in magic-removal

Reported by: Christopher Lenz <cmlenz@…> Owned by: adrian
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: UI/UX:


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 10 years ago by adrian

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

(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