]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- Python 2.5 is supported, needs
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Dec 2011 18:36:59 +0000 (13:36 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Dec 2011 18:36:59 +0000 (13:36 -0500)
  __future__.with_statement

CHANGES
alembic/op.py
alembic/script.py
alembic/templates/generic/env.py
alembic/util.py
tests/__init__.py
tests/test_mssql.py
tests/test_postgresql.py
tests/test_sql_script.py
tests/test_versioning.py

diff --git a/CHANGES b/CHANGES
index a60f041ede0515d7993ed8108981d91958eacefc..ff9f4dfefa118c2ee1df155feab8c8efcd72f24e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@
 
 - PyPy is supported.
 
+- Python 2.5 is supported, needs 
+  __future__.with_statement
+
 0.1.0
 =====
 - Initial release.  Status of features:
index 9861db1ef64c00f47c90edf59ad2e216cd5594ee..4f3423d95b56303a5dbca662a593d392876ecab6 100644 (file)
@@ -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)
index 770c6506752c28b15c0ab8aa480c73fe4ef0e8b1..4b7eaf25dd8602eec7943bb9e100700fa0cda81d 100644 (file)
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
 import os
 from alembic import util
 import shutil
index fbd0ada002137ed45389fa18375c650c6d534de1..73ce40377e3be6d793ea65555a11dc327eba5576 100644 (file)
@@ -1,3 +1,4 @@
+from __future__ import with_statement
 from alembic import context
 from sqlalchemy import engine_from_config
 from logging.config import fileConfig
index c61040f93b738c54ab05eb2201a4b9cd7082c215..f58992a0e306a5b3fd472e9cef3514dc50abfb25 100644 (file)
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
 from mako.template import Template
 import sys
 import os
index e94079d6410eae22736e6c6730fecadb3b20f2fe..4d84331dddb5be00c5e05eb90512f5fa84327638 100644 (file)
@@ -1,3 +1,5 @@
+from __future__ import with_statement
+
 from sqlalchemy.engine import url, default
 import shutil
 import os
index f86f01d2b46c4ed2dcf288caecd449019859e21c..88ed9b52a218477c4b213c3d8307e22f8999937e 100644 (file)
@@ -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
index 157b2e8be26c6619d56618cce9f84145b4f8f788..46cd81d613afeca40c46911793bf483cbac46bc7 100644 (file)
@@ -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
index 85aa33d59ff1da8d6892bfe575595150ba1cae00..ab86f19bc1b85a04a4ebc40ce41d93d655b26bed 100644 (file)
@@ -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
index 75ba348a2b09332c240ad32dd1099d27a433ecc7..4ba09e5aa02f0acb7e1b629a8d0e765303d43d54 100644 (file)
@@ -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