diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-03 13:36:59 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-03 13:36:59 -0500 |
commit | 192d86c69d97286b2284fae39c74c1752077f798 (patch) | |
tree | cb58cb28f0623e97a517c9b33b71e8df7e0dda29 | |
parent | 2e2fc529a4db7aea2b3c70de932c983e1c0b990e (diff) | |
download | alembic-192d86c69d97286b2284fae39c74c1752077f798.tar.gz |
- Python 2.5 is supported, needs
__future__.with_statement
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | alembic/op.py | 3 | ||||
-rw-r--r-- | alembic/script.py | 2 | ||||
-rw-r--r-- | alembic/templates/generic/env.py | 1 | ||||
-rw-r--r-- | alembic/util.py | 2 | ||||
-rw-r--r-- | tests/__init__.py | 2 | ||||
-rw-r--r-- | tests/test_mssql.py | 2 | ||||
-rw-r--r-- | tests/test_postgresql.py | 2 | ||||
-rw-r--r-- | tests/test_sql_script.py | 2 | ||||
-rw-r--r-- | tests/test_versioning.py | 1 |
10 files changed, 17 insertions, 3 deletions
@@ -5,6 +5,9 @@ - PyPy is supported. +- Python 2.5 is supported, needs + __future__.with_statement + 0.1.0 ===== - Initial release. Status of features: diff --git a/alembic/op.py b/alembic/op.py index 9861db1..4f3423d 100644 --- a/alembic/op.py +++ b/alembic/op.py @@ -42,7 +42,8 @@ def _foreign_key_constraint(name, source, referent, local_cols, remote_cols): def _unique_constraint(name, source, local_cols, **kw): t = schema.Table(source, schema.MetaData(), *[schema.Column(n, NULLTYPE) for n in local_cols]) - uq = schema.UniqueConstraint(*t.c, name=name, **kw) + kw['name'] = name + uq = schema.UniqueConstraint(*t.c, **kw) # TODO: need event tests to ensure the event # is fired off here t.append_constraint(uq) diff --git a/alembic/script.py b/alembic/script.py index 770c650..4b7eaf2 100644 --- a/alembic/script.py +++ b/alembic/script.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + import os from alembic import util import shutil diff --git a/alembic/templates/generic/env.py b/alembic/templates/generic/env.py index fbd0ada..73ce403 100644 --- a/alembic/templates/generic/env.py +++ b/alembic/templates/generic/env.py @@ -1,3 +1,4 @@ +from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config from logging.config import fileConfig diff --git a/alembic/util.py b/alembic/util.py index c61040f..f58992a 100644 --- a/alembic/util.py +++ b/alembic/util.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + from mako.template import Template import sys import os diff --git a/tests/__init__.py b/tests/__init__.py index e94079d..4d84331 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + from sqlalchemy.engine import url, default import shutil import os diff --git a/tests/test_mssql.py b/tests/test_mssql.py index f86f01d..88ed9b5 100644 --- a/tests/test_mssql.py +++ b/tests/test_mssql.py @@ -1,5 +1,5 @@ """Test op functions against MSSQL.""" - +from __future__ import with_statement from tests import op_fixture, capture_context_buffer, \ _no_sql_testing_config, assert_raises_message, staging_env, \ three_rev_fixture, clear_staging_env diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 157b2e8..46cd81d 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -1,4 +1,4 @@ - +from __future__ import with_statement from tests import op_fixture, db_for_dialect, eq_, staging_env, \ clear_staging_env, _no_sql_testing_config,\ capture_context_buffer, requires_07 diff --git a/tests/test_sql_script.py b/tests/test_sql_script.py index 85aa33d..ab86f19 100644 --- a/tests/test_sql_script.py +++ b/tests/test_sql_script.py @@ -1,3 +1,5 @@ +from __future__ import with_statement + from tests import clear_staging_env, staging_env, \ _no_sql_testing_config, sqlite_db, eq_, ne_, capture_context_buffer, \ three_rev_fixture diff --git a/tests/test_versioning.py b/tests/test_versioning.py index 75ba348..4ba09e5 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -1,3 +1,4 @@ +from __future__ import with_statement from tests import clear_staging_env, staging_env, _sqlite_testing_config, sqlite_db, eq_, ne_ from alembic import command, util from alembic.script import ScriptDirectory |