From 34c77d520695be7add58d3396b83f2cb45b8c0d977a1bc327fd3ccef425c9def Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 7 Jun 2021 12:24:18 +0000 Subject: [PATCH] Accepting request 897994 from home:mnhauke - Update to version 2.0.1 Bug Fixes * Exclude plugins and tests_isolated directories from tarball published to PyPI for cmd2 release - Update to version 2.0.0 Bug Fixes * Fixed issue where history indexes could get repeated * Fixed issue where TableCreator was tossing blank last line * Corrected help text for alias command Breaking Changes * cmd2 2.0 supports Python 3.6+ (removed support for Python 3.5) * Argparse Completion / Settables + Replaced choices_function / choices_method with choices_provider. + Replaced completer_function / completer_method with completer. + ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the first positional + argument to choices_provider and completer functions. * Moved basic_complete from utils into cmd2.Cmd class. * Moved CompletionError to exceptions.py * Namespace.__statement__ has been removed. Use Namespace.cmd2_statement.get() instead. * Removed --silent flag from alias/macro create since startup scripts can be run silently. * Removed --with_silent flag from alias/macro list since startup scripts can be run silently. * Removed with_argparser_and_unknown_args since it was deprecated in 1.3.0. * Renamed silent_startup_script to silence_startup_script for clarity. OBS-URL: https://build.opensuse.org/request/show/897994 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cmd2?expand=0&rev=82 --- cmd2-1.5.0.tar.gz | 3 -- cmd2-2.0.1.tar.gz | 3 ++ python-cmd2.changes | 91 +++++++++++++++++++++++++++++++++++++++++++++ python-cmd2.spec | 3 +- 4 files changed, 96 insertions(+), 4 deletions(-) delete mode 100644 cmd2-1.5.0.tar.gz create mode 100644 cmd2-2.0.1.tar.gz diff --git a/cmd2-1.5.0.tar.gz b/cmd2-1.5.0.tar.gz deleted file mode 100644 index 4260e1b..0000000 --- a/cmd2-1.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:701a8c9975c4abc45e5d13906ab149f959f812869106347323a3f89ac0e82a62 -size 662624 diff --git a/cmd2-2.0.1.tar.gz b/cmd2-2.0.1.tar.gz new file mode 100644 index 0000000..80388ef --- /dev/null +++ b/cmd2-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44b208dc8e0034df35466ab4823fa962afbeec8c52663cffe723f15552f12faf +size 644705 diff --git a/python-cmd2.changes b/python-cmd2.changes index d0743d4..288a2eb 100644 --- a/python-cmd2.changes +++ b/python-cmd2.changes @@ -1,3 +1,94 @@ +------------------------------------------------------------------- +Mon Jun 7 08:09:29 UTC 2021 - Martin Hauke + +- Update to version 2.0.1 + Bug Fixes + * Exclude plugins and tests_isolated directories from tarball + published to PyPI for cmd2 release +- Update to version 2.0.0 + Bug Fixes + * Fixed issue where history indexes could get repeated + * Fixed issue where TableCreator was tossing blank last line + * Corrected help text for alias command + Breaking Changes + * cmd2 2.0 supports Python 3.6+ (removed support for Python 3.5) + * Argparse Completion / Settables + + Replaced choices_function / choices_method with + choices_provider. + + Replaced completer_function / completer_method with completer. + + ArgparseCompleter now always passes cmd2.Cmd or CommandSet + instance as the first positional + + argument to choices_provider and completer functions. + * Moved basic_complete from utils into cmd2.Cmd class. + * Moved CompletionError to exceptions.py + * Namespace.__statement__ has been removed. + Use Namespace.cmd2_statement.get() instead. + * Removed --silent flag from alias/macro create since startup + scripts can be run silently. + * Removed --with_silent flag from alias/macro list since startup + scripts can be run silently. + * Removed with_argparser_and_unknown_args since it was deprecated + in 1.3.0. + * Renamed silent_startup_script to silence_startup_script for + clarity. + * Replaced cmd2.Cmd.completion_header with + cmd2.Cmd.formatted_completions. + * Settables now have new initialization parameters. It is now a + required parameter to supply the reference to the object that + holds the settable attribute. cmd2.Cmd.settables is no longer a + public dict attribute - it is now a property that aggregates + all Settables across all registered CommandSets. + * Failed transcript testing now sets self.exit_code to 1 instead + of -1. + * Renamed use_ipython keyword parameter of cmd2.Cmd.__init__() to + include_ipy. + * ipy command is only enabled if include_py parameter is True. + * Removed ability to run Python commands from the command line + with py. Now py takes no arguments and just opens an + interactive Python shell. + * Changed default behavior of runcmds_plus_hooks() to not stop + when Ctrl-C is pressed and instead run the next command in its + list. + * Removed cmd2.Cmd.quit_on_sigint flag, which when True, quit + the application when Ctrl-C was pressed at the prompt. + * The history bug fix resulted in structure changes to the + classes in cmd2.history. Therefore, persistent history files + created with versions older than 2.0.0 are not compatible. + Enhancements + * Added support for custom tab completion and up-arrow input + history to cmd2.Cmd2.read_input. + * Added cmd2.exceptions.PassThroughException to raise unhandled + command exceptions instead of printing them. + * Added support for ANSI styles and newlines in tab completion + results using cmd2.Cmd.formatted_completions. + * cmd2 provides this capability automatically if you return + argparse completion matches as CompletionItems. + * Settables enhancements: + + Settables may be optionally scoped to a CommandSet. + + Settables added to CommandSets will appear when a CommandSet + is registered and disappear when a CommandSet is + unregistered. Optionally, scoped Settables may have a + prepended prefix. + + Settables now allow changes to be applied to any arbitrary + object attribute. It no longer needs to match an + + attribute added to the cmd2 instance itself. + + Raising SystemExit or calling sys.exit() in a command or hook + function will set self.exit_code to the exit code used in + those calls. It will also result in the command loop stopping. + + ipy command now includes all of self.py_locals in the + IPython environment + + Added include_py keyword parameter to cmd2.Cmd.__init__(). + If False, then the py command will not be available. Defaults + to False. run_pyscript is not affected by this parameter. + + Made the amount of space between columns in a SimpleTable + configurable On POSIX systems, shell commands and processes + being piped to are now run in the user's preferred shell + instead of /bin/sh. The preferred shell is obtained by + reading the SHELL environment variable. If that doesn't + exist or is empty, then /bin/sh is used. + + Changed cmd2.Cmd._run_editor() to the public method + cmd2.Cmd.run_editor() + ------------------------------------------------------------------- Sun Apr 25 13:46:11 UTC 2021 - Martin Hauke diff --git a/python-cmd2.spec b/python-cmd2.spec index 14b6cfc..b80021e 100644 --- a/python-cmd2.spec +++ b/python-cmd2.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-cmd2 -Version: 1.5.0 +Version: 2.0.1 Release: 0 Summary: Extra features for standard library's cmd module License: MIT @@ -46,6 +46,7 @@ BuildRequires: %{python_module attrs >= 16.3.0} BuildRequires: %{python_module colorama >= 0.3.7} BuildRequires: %{python_module mock} BuildRequires: %{python_module pyperclip >= 1.6} +BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module wcwidth >= 0.1.7}