Commits

Mike Bayer committed 5d3a4ef

- repair entirely broken revision_environment feature released in 0.3.3
- its beta

Comments (0)

Files changed (4)

+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

alembic/__init__.py

 from os import path
 
-__version__ = '0.3.3'
+__version__ = '0.3.4'
 
 package_dir = path.abspath(path.dirname(__file__))
 

alembic/command.py

     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
             return []
     elif environment:
         def retrieve_migrations(rev, context):
-            pass
+            return []
 
     if environment:
         with EnvironmentContext(
       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',