]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
- return the same error message as when running on all other pythons
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Feb 2013 22:58:06 +0000 (17:58 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Feb 2013 22:58:06 +0000 (17:58 -0500)
- changelog

alembic/config.py
docs/build/changelog.rst

index 1b3b3413b52285e350bc6fc860a3433757d9a359..71f2731b14faa39b786900d261e17c6cb8cc0021 100644 (file)
@@ -246,7 +246,9 @@ class CommandLine(object):
     def main(self, argv=None):
         options = self.parser.parse_args(argv)
         if not hasattr(options, "cmd"):
-            self.parser.print_help()
+            # see http://bugs.python.org/issue9253, argparse
+            # behavior changed incompatibly in py3.3
+            self.parser.error("too few arguments")
         else:
             cfg = Config(options.config, options.name)
             self.run_cmd(cfg, options)
index 15e57ddb389fbcabb5a443456b4f9e3554f7e4ff..f092c50e42fc9860d688433770270a9de83c7c54 100644 (file)
@@ -6,6 +6,15 @@ Changelog
 .. changelog::
     :version: 0.5.0
 
+    .. change::
+        :tags: bug
+        :pullreq: 27
+
+      Worked around a backwards-incompatible regression in Python3.3
+      regarding argparse; running "alembic" with no arguments
+      now yields an informative error in py3.3 as with all previous versions.
+      Courtesy Andrey Antukh.
+
     .. change::
         :tags: change