From 639b58df6e7edf4b7208057d1bbe68b7df50b363 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Thu, 6 Mar 2008 19:09:59 +0000 Subject: [PATCH] provide compatibility with sqlalchemy 0.4 * fix sqlalchemy imports (fixes #6) * set runtime dependencies to sqlalchemy >= 0.4 and sqlalchemy-migrate >= 0.4 git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/trunk@245 a67ec6bc-e5d5-0310-a910-815c51eb3124 --- gnuviechadmin/backend/BackendTo.py | 2 +- gnuviechadmin/backend/tables.py | 3 ++- setup.py | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gnuviechadmin/backend/BackendTo.py b/gnuviechadmin/backend/BackendTo.py index 1e46058..3fb5b5d 100644 --- a/gnuviechadmin/backend/BackendTo.py +++ b/gnuviechadmin/backend/BackendTo.py @@ -19,7 +19,7 @@ # # Version: $Id$ -from sqlalchemy import object_mapper +from sqlalchemy.orm import object_mapper from tables import * diff --git a/gnuviechadmin/backend/tables.py b/gnuviechadmin/backend/tables.py index 6c8f9f9..0f7e1e6 100644 --- a/gnuviechadmin/backend/tables.py +++ b/gnuviechadmin/backend/tables.py @@ -20,6 +20,7 @@ # Version: $Id$ from sqlalchemy import * +from sqlalchemy.exceptions import NoSuchTableError import sys import migrate.versioning.api from settings import * @@ -37,7 +38,7 @@ to fix this.""" % (dbversion, required_version, config.get('database', 'uri'), config.get('database', 'repository'))) sys.exit(1) -except exceptions.NoSuchTableError, nste: +except NoSuchTableError, nste: print nste sys.exit(1) diff --git a/setup.py b/setup.py index 9890ee0..b5e99ae 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ # -*- python -*- -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- # # Copyright (C) 2007 by Jan Dittberner. # @@ -28,8 +28,8 @@ setup( packages = find_packages(), scripts = ['bin/gva'], - install_requires = ['sqlalchemy >= 0.3.10', - 'migrate >= 0.3' ], + install_requires = ['sqlalchemy >= 0.4', + 'sqlalchemy-migrate >= 0.4' ], setup_requires = [], include_package_data = True,