From: Mike Bayer Date: Mon, 11 Feb 2013 22:58:06 +0000 (-0500) Subject: - return the same error message as when running on all other pythons X-Git-Tag: rel_0_5_0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0b62df170100c777b4e847ff8c15a4206d450fd;p=thirdparty%2Fsqlalchemy%2Falembic.git - return the same error message as when running on all other pythons - changelog --- diff --git a/alembic/config.py b/alembic/config.py index 1b3b3413..71f2731b 100644 --- a/alembic/config.py +++ b/alembic/config.py @@ -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) diff --git a/docs/build/changelog.rst b/docs/build/changelog.rst index 15e57ddb..f092c50e 100644 --- a/docs/build/changelog.rst +++ b/docs/build/changelog.rst @@ -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