Ticket #1071 (closed defect: fixed)

Opened 3 years ago

Last modified 2 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:

Description

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 ?

execute_manager(settings)

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

utility.execute()

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

self.fetch_command(subcommand).run_from_argv(self.argv)

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

import(name)

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

finally:


SyntaxError?: invalid syntax

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

Change History

comment:1 Changed 2 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.