Ticket #1071 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Syntax error in db/generic.py with Python 2.4

Reported by: Gert Kremer <gkremer+south@…> Owned by: andrew
Priority: major Milestone: 1.0
Component: commands Version: 0.7.4
Keywords: Cc:


When using South 0.7.4 with Python 2.4, the initial syncdb fails with a SyntaxError? in db/generic.py:

./manage.py syncdb

Traceback (most recent call last):

File "./manage.py", line 14, in ?


File "/usr/lib/python2.4/site-packages/django/core/management/init.py", line 438, in execute_manager


File "/usr/lib/python2.4/site-packages/django/core/management/init.py", line 379, in execute


File "/usr/lib/python2.4/site-packages/django/core/management/init.py", line 261, in fetch_command

klass = load_command_class(app_name, subcommand)

File "/usr/lib/python2.4/site-packages/django/core/management/init.py", line 67, in load_command_class

module = import_module('%s.management.commands.%s' % (app_name, name))

File "/usr/lib/python2.4/site-packages/django/utils/importlib.py", line 35, in import_module


File "/home/gkremer/django_dev/south/management/commands/init.py", line 13, in ?

from south.management.commands.syncdb import Command as SyncCommand?

File "/home/gkremer/django_dev/south/management/commands/syncdb.py", line 17, in ?

from south.db import dbs

File "/home/gkremer/django_dev/south/db/init.py", line 63, in ?

module = import(module_name, {}, {}, [])

File "/home/gkremer/django_dev/south/db/postgresql_psycopg2.py", line 3, in ?

from south.db import generic

File "/home/gkremer/django_dev/south/db/generic.py", line 122


SyntaxError?: invalid syntax

The try/except/finally construct used here does not work with Python 2.4

Change History

comment:1 Changed 4 years ago by andrew

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

Fixed in [cdaa2160ffc6].

Note: See TracTickets for help on using tickets.