diff options
author | Hong Minhee <minhee@dahlia.kr> | 2013-04-13 07:00:41 +0900 |
---|---|---|
committer | Hong Minhee <minhee@dahlia.kr> | 2013-04-13 07:00:41 +0900 |
commit | 8985077b31c371a3e97c38203a4af36c33728b73 (patch) | |
tree | 3afa983f9b7a12dedec288de2b045208dde99b0c /alembic/operations.py | |
parent | 13aa853759c34149153fa93e7b979476aeb37da1 (diff) | |
download | alembic-8985077b31c371a3e97c38203a4af36c33728b73.tar.gz |
Introduce compatibility module
Diffstat (limited to 'alembic/operations.py')
-rw-r--r-- | alembic/operations.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/alembic/operations.py b/alembic/operations.py index 9f36502..441e54a 100644 --- a/alembic/operations.py +++ b/alembic/operations.py @@ -1,13 +1,10 @@ -try: - import builtins -except ImportError: - import __builtin__ as builtins from contextlib import contextmanager from sqlalchemy.types import NULLTYPE, Integer from sqlalchemy import schema as sa_schema from . import util +from .compat import string_types from .ddl import impl __all__ = ('Operations',) @@ -147,7 +144,7 @@ class Operations(object): ForeignKey. """ - if isinstance(fk._colspec, getattr(builtins, 'basestring', str)): + if isinstance(fk._colspec, string_types): table_key, cname = fk._colspec.rsplit('.', 1) sname, tname = self._parse_table_key(table_key) if table_key not in metadata.tables: |