Compare commits

..

No commits in common. "factory" and "factory" have entirely different histories.

5 changed files with 28 additions and 134 deletions

3
cmd2-2.4.3.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71873c11f72bd19e2b1db578214716f0d4f7c8fa250093c601265a9a717dee52
size 678661

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:daf11414d6985d5020a2ae4d258411ab3a2bf1548f474977cd964a6cb2655f36
size 621759

View File

@ -1,17 +0,0 @@
Index: cmd2-2.5.11/pyproject.toml
===================================================================
--- cmd2-2.5.11.orig/pyproject.toml
+++ cmd2-2.5.11/pyproject.toml
@@ -104,12 +104,6 @@ warn_unused_ignores = false
[tool.pytest.ini_options]
testpaths = ["tests"]
-addopts = [
- "--cov=cmd2",
- "--cov-append",
- "--cov-report=term",
- "--cov-report=html",
-]
[tool.ruff]
# Exclude a variety of commonly ignored directories.

View File

@ -1,100 +1,3 @@
-------------------------------------------------------------------
Fri Jul 4 09:05:16 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 2.5.11:
* Fixed duplicated parameter tables in API documentation.
* Fixed docstring style for MkDocs API documentation so
parameters are displayed properly.
* Fixed 'index out of range' error when passing no arguments to
an argparse-based command function.
-------------------------------------------------------------------
Wed Dec 18 17:37:07 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.5.8
Bug Fixes
* Rolled back undocumented changes to printing functions
introduced in 2.5.0.
-------------------------------------------------------------------
Sat Nov 23 11:09:05 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.5.7
* Fixed issue where argument parsers for overridden commands
were not being created..
* Fixed issue where Cmd.ppaged() was not writing to the passed
in destination.
-------------------------------------------------------------------
Thu Nov 14 19:27:34 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.5.6
* Fixed type hint for with_default_category decorator which
caused type checkers to mistype a subclass of CommandSet as a
plain CommandSet.
- Update to version 2.5.5
* Fixed type hints for passing a class method to with_argparser
and as_subcommand_to.
* Fixed issue where set command was not always printing a
settable's current value.
-------------------------------------------------------------------
Thu Nov 7 16:32:16 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to versino 2.5.4
* Fixed ZeroDivisionError in async_alert() when
shutil.get_terminal_size().columns is 0.
- Update to version 2.5.3
* Changed CommandSet._cmd to a read-only property which never
returns None because it is meant to be called after the
CommandSet is registered. This addresses type checker errors
that occurred if CommandSet._cmd wasn't cast or checked if
None before use.
-------------------------------------------------------------------
Sun Nov 3 19:58:40 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.5.2
* Fixed default pytest execution when not using cmd2's custom
invoke command via inv pytest.
- Update to version 2.5.1
* Fixed readline bug when using ipy command with gnureadline
and Python 3.13.
- Add patch:
* cmd2-no-coverage-tests.patch
-------------------------------------------------------------------
Thu Oct 24 18:43:27 UTC 2024 - Martin Hauke <mardnh@gmx.de>
- Update to version 2.5.0
Breaking Change
* cmd2 2.5 supports Python 3.8+
(removed support for Python 3.6 and 3.7).
Bug Fixes
* Fixed issue where persistent history file was not saved upon
SIGHUP and SIGTERM signals.
* Multiline commands are no longer fragmented in up-arrow history
* Fixed bug where async_alert() overwrites readline's incremental
and non-incremental search prompts.
+ This fix introduces behavior where an updated prompt won't
display after an aborted search.
+ until a user presses Enter. See async_printing.py
+ example for how to handle this case using
Cmd.need_prompt_refresh() and Cmd.async_refresh_prompt().
Enhancements
* Removed dependency on attrs and replaced with dataclasses.
* add allow_clipboard initialization parameter and attribute to
disable ability to.
* add output to the operating system clipboard.
* Updated unit tests to be Python 3.13 compliant.
* Fall back to bz2 compression of history file when lzma is not
installed..
* Added settable called scripts_add_to_history which determines
whether scripts and pyscripts
* add commands to history.
Deletions (potentially breaking changes)
* Removed apply_style from Cmd.pwarning().
-------------------------------------------------------------------
Sat Jan 28 14:33:56 UTC 2023 - Dirk Müller <dmueller@suse.com>
@ -177,7 +80,7 @@ Sat Oct 16 21:48:02 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 2.2.0:
* Fixed extra space appended to each alias by "alias list" command
* New function `set_default_ap_completer_type()`
* Added `ArgumentParser.get_ap_completer_type()` and
* Added `ArgumentParser.get_ap_completer_type()` and
`ArgumentParser.set_ap_completer_type()`.
* Added `ap_completer_type` keyword arg to `Cmd2ArgumentParser.__init__()`
which saves a call to `set_ap_completer_type()`. This keyword will also
@ -543,8 +446,8 @@ Thu Feb 28 11:43:56 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
the argparse object. Also, single-character tokens that happen to be a
prefix char are not treated as flags by argparse and AutoCompleter now
matches that behavior.
* Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag
* Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options)
* Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag
* Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options)
* Added ``exit_code`` attribute of ``cmd2.Cmd`` class
* Enables applications to return a non-zero exit code when exiting from ``cmdloop``
* ``ACHelpFormatter`` now inherits from ``argparse.RawTextHelpFormatter`` to make it easier
@ -556,7 +459,7 @@ Thu Feb 28 11:43:56 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
display when the user is still entering text at the prompt.
* Cross-platform colored output support
* Deprecated the built-in ``cmd2`` support for colors including ``Cmd.colorize()`` and ``Cmd._colorcodes``
* The ``preparse``, ``postparsing_precmd``, and ``postparsing_postcmd`` methods *deprecated* in the previous release
* The ``preparse``, ``postparsing_precmd``, and ``postparsing_postcmd`` methods *deprecated* in the previous release
have been deleted
* The new application lifecycle hook system allows for registration of callbacks to be called at various points
in the lifecycle and is more powerful and flexible than the previous system
@ -577,7 +480,7 @@ Thu Sep 20 20:17:41 UTC 2018 - Todd R <toddrme2178@gmail.com>
- Update to version 0.9.4
+ Bug Fixes
* Fixed bug where ``preparse`` was not getting called
* Fixed bug in parsing of multiline commands where matching quote is on another line
* Fixed bug in parsing of multiline commands where matching quote is on another line
+ Enhancements
* Improved implementation of lifecycle hooks to support a plugin
framework, see ``docs/hooks.rst`` for details.
@ -904,7 +807,7 @@ Mon Nov 14 14:21:27 UTC 2016 - dmueller@suse.com
- update to 0.6.9:
* Support Python 3 input()
-------------------------------------------------------------------
Fri Jan 9 00:30:50 UTC 2015 - dmueller@suse.com
@ -943,7 +846,7 @@ Thu Jul 25 15:35:32 UTC 2013 - dheidler@suse.de
-------------------------------------------------------------------
Mon Apr 29 11:18:38 UTC 2013 - dmueller@suse.com
- update to 0.6.5.1:
- update to 0.6.5.1:
* Fix requires to python-pyparsing
-------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#
# spec file for package python-cmd2
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,16 +16,17 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-cmd2
Version: 2.5.11
Version: 2.4.3
Release: 0
Summary: Extra features for standard library's cmd module
License: MIT
URL: https://github.com/python-cmd2/cmd2
Source: https://github.com/python-cmd2/cmd2/archive/refs/tags/%{version}.tar.gz#/cmd2-%{version}.tar.gz
Patch0: cmd2-no-coverage-tests.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
Source: https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-%{version}.tar.gz
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -35,11 +36,17 @@ Requires: python-attrs >= 16.3.0
Requires: python-pyperclip >= 1.6
Requires: python-wcwidth >= 0.1.7
BuildArch: noarch
%if 0%{?python_version_nodots} < 38
Requires: python-importlib_metadata >= 1.6
Requires: python-typing_extensions
%endif
# SECTION Test requirements
BuildRequires: %{python_module attrs >= 16.3.0}
BuildRequires: %{python_module importlib_metadata >= 1.6 if %python-base < 3.8}
BuildRequires: %{python_module pyperclip >= 1.6}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module typing_extensions if %python-base < 3.8}
BuildRequires: %{python_module wcwidth >= 0.1.7}
BuildRequires: vim
# /SECTION
@ -65,15 +72,16 @@ Drop-in replacement adds several features for command-prompt tools:
* test apps against sample session transcript (see example/example.py)
%prep
%autosetup -p1 -n cmd2-%{version}
%setup -q -n cmd2-%{version}
# Fix spurious-executable-perm
chmod a-x README.md
sed -i '/--cov/d' setup.cfg
%build
%pyproject_wheel
%python_build
%install
%pyproject_install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@ -84,6 +92,6 @@ chmod a-x README.md
%license LICENSE
%doc CHANGELOG.md README.md
%{python_sitelib}/cmd2
%{python_sitelib}/cmd2-*-info
%{python_sitelib}/cmd2-%{version}*-info
%changelog