diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-05 12:13:28 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-01-05 12:13:28 -0500 |
commit | 44a611700f76410d07d527059391dac689b897b4 (patch) | |
tree | 2af7f64403ae27c6e4824381537895fa53c37d19 /alembic/util.py | |
parent | b708c3e741087c2acbe945f34c568bc9473204c2 (diff) | |
download | alembic-44a611700f76410d07d527059391dac689b897b4.tar.gz |
- add workaround to setup.py to avoid setuptools issue regarding multiprocessing
when "setup.py test" is run, #96
- add version detection for 0.8, apply this version detection to
test_autogenerate:AutogenRenderTest.test_render_fk_constraint_kwarg
and emit explicit append_constraint() for each FK if not on 0.8 as FKs
do not auto-attach in 0.7, #96
- add a README containing instructions for running tests and setting up
optional database backens, #96
Diffstat (limited to 'alembic/util.py')
-rw-r--r-- | alembic/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/alembic/util.py b/alembic/util.py index 0fe4800..bf2c89d 100644 --- a/alembic/util.py +++ b/alembic/util.py @@ -22,10 +22,11 @@ def _safe_int(value): try: return int(value) except: - return 0 -_vers = tuple([_safe_int(x) for x in __version__.split(".")]) + return value +_vers = tuple([_safe_int(x) for x in re.findall(r'(\d+|[abc]\d)', __version__)]) sqla_06 = _vers > (0, 6) sqla_07 = _vers > (0, 7) +sqla_08 = _vers >= (0, 8, 0, 'b2') if not sqla_06: raise CommandError( "SQLAlchemy 0.6 or greater is required. " |