From 9e213ed2921cf0be75a61a05401320eb8b75a332 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 2 Jun 2012 20:06:21 -0400 Subject: - repair entirely broken revision_environment feature released in 0.3.3 - its beta --- CHANGES | 8 ++++++++ alembic/__init__.py | 2 +- alembic/command.py | 9 +++++---- setup.py | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 8e79cb5..5d6e7c2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,13 @@ +0.3.4 +===== +- [bug] Fixed command-line bug introduced by the + "revision_environment" feature. + 0.3.3 ===== +NOTE: 0.3.3 was released with a command line bug, +so please skip right to 0.3.4 + - [feature] New config argument "revision_environment=true", causes env.py to be run unconditionally when the "revision" command diff --git a/alembic/__init__.py b/alembic/__init__.py index d75fb22..81898ff 100644 --- a/alembic/__init__.py +++ b/alembic/__init__.py @@ -1,6 +1,6 @@ from os import path -__version__ = '0.3.3' +__version__ = '0.3.4' package_dir = path.abspath(path.dirname(__file__)) diff --git a/alembic/command.py b/alembic/command.py index 8bb82e9..cefd9d9 100644 --- a/alembic/command.py +++ b/alembic/command.py @@ -60,15 +60,16 @@ def init(config, directory, template='generic'): util.msg("Please edit configuration/connection/logging "\ "settings in %r before proceeding." % config_file) -def revision(config, message=None, autogenerate=False, environment=False): +def revision(config, message=None, autogenerate=False): """Create a new revision file.""" script = ScriptDirectory.from_config(config) template_args = {} imports = set() - if util.asbool(config.get_main_option("revision_environment")): - environment = True + environment = util.asbool( + config.get_main_option("revision_environment") + ) if autogenerate: environment = True @@ -80,7 +81,7 @@ def revision(config, message=None, autogenerate=False, environment=False): return [] elif environment: def retrieve_migrations(rev, context): - pass + return [] if environment: with EnvironmentContext( diff --git a/setup.py b/setup.py index bab381b..4b2664b 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup(name='alembic', description="A database migration tool for SQLAlchemy.", long_description=open(readme).read(), classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Developers', 'Programming Language :: Python', -- cgit v1.2.1