Skip to content

Commit e5ebc4c

Browse files
committed
Merge branch 'reserved_row_toolbar' into stage4-handoffs-integration
# Conflicts: # cmd2/cmd2.py # cmd2/command_toolbar.py # cmd2/reserved_toolbar.py # cmd2/utils.py # tests/test_cmd2.py # tests/test_pipeline_job_control.py # tests/test_utils.py
2 parents 7f6b8dc + 96b4886 commit e5ebc4c

38 files changed

Lines changed: 3252 additions & 581 deletions

‎.github/CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Linux). You can install `uv` using instructions at the link above.
117117
You can then install multiple versions of Python using `uv` like so:
118118

119119
```sh
120-
uv python install 3.11 3.12 3.13 3.14
120+
uv python install 3.11 3.12 3.13 3.14 3.15
121121
```
122122

123123
### Forking the project

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
# Initializes the CodeQL tools for scanning.
4747
- name: Initialize CodeQL
48-
uses: github/codeql-action/init@v4.38.1
48+
uses: github/codeql-action/init@v4.38.3
4949
with:
5050
languages: ${{ matrix.language }}
5151
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v4.38.1
59+
uses: github/codeql-action/autobuild@v4.38.3
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 https://git.io/JvXDl
@@ -70,4 +70,4 @@ jobs:
7070
# make release
7171

7272
- name: Perform CodeQL Analysis
73-
uses: github/codeql-action/analyze@v4.38.1
73+
uses: github/codeql-action/analyze@v4.38.3

‎.github/workflows/docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install uv and set the python version
2525
uses: astral-sh/setup-uv@v7
2626
with:
27-
python-version: "3.14"
27+
python-version: "3.15"
2828
- name: Install the project
2929
run: uv sync --no-default-groups --group docs
3030
- name: Check if the Zensical documentation can be built

‎.github/workflows/quality.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install uv and set the python version
2727
uses: astral-sh/setup-uv@v7
2828
with:
29-
python-version: "3.14"
29+
python-version: "3.15"
3030
- name: Install the project
3131
run: uv sync --no-default-groups --group quality
3232
- name: Run prek

‎.github/workflows/tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: ["3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
15+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15", "3.15t"]
1616
fail-fast: false
1717

1818
runs-on: ${{ matrix.os }}

‎.github/workflows/typecheck.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ["3.11", "3.12", "3.13", "3.14"]
18+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
1919
fail-fast: false
2020
defaults:
2121
run:

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: trailing-whitespace
1616

1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: "v0.16.7"
18+
rev: "v0.17.0"
1919
hooks:
2020
- id: ruff-format
2121
args: [--config=ruff.toml]
@@ -31,7 +31,7 @@ repos:
3131
- prettier-plugin-toml@2.0.6
3232

3333
- repo: https://github.com/crate-ci/typos
34-
rev: v1.50.1
34+
rev: v1.51.1
3535
hooks:
3636
- id: typos
3737
exclude: |

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ project, which utilizes `uv` for environment and package management.
1515
- **New Dependencies:** If a new dependency is required, please state the reason for its inclusion.
1616
- Do not commit spec, plan, or markdown documents to git without asking first.
1717
- Save plans to `~/.superpowers/plans/` instead of the project directory.
18+
- This project uses a 127 character maximum line length for all Python code, including for comments.
19+
- This project uses a 100 character maximum line length for Markdown files.
1820

1921
## Python Code Standards
2022

‎CHANGELOG.md‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 4.3.0 (TBD)
1+
## 4.4.0 (TBD)
22

33
- Bug Fixes
44
- Background output printed above an active reserved prompt through `run_in_terminal()` or
@@ -61,6 +61,37 @@
6161
Output which already fits on the screen is printed directly rather than paged. Set
6262
`self.use_builtin_pager = False` to keep using the external `pager`/`pager_chop` commands.
6363

64+
## 4.3.0 (October 13, 2026)
65+
66+
- Stabilized features
67+
- `@with_annotated` is no longer experimental. It was introduced as an experimental feature in
68+
4.0.0 and is now a fully supported way to define a command's arguments, alongside
69+
`@with_argparser`. This covers the decorator and its supporting API in `cmd2.annotated`,
70+
including `Argument`, `Option`, `Group`, and `ArgumentBlock`.
71+
[Annotated Argument Processing](https://cmd2.readthedocs.io/en/latest/features/annotated/).
72+
- Bug Fixes
73+
- On POSIX, piping a command's output to an interactive program such as `less`
74+
(`help -v | less`) now runs that program as the terminal's foreground job, as a shell pipeline
75+
does. It had run in a separate session that never received the terminal, so Ctrl-Z and `fg`
76+
did not suspend and resume it together with cmd2. The program now owns the terminal as it
77+
starts, so a pager can set its terminal modes, and Ctrl-C and Ctrl-Z reach the whole pipeline.
78+
Pipes started from a worker thread, or whose output does not go to the terminal, such as one
79+
nested in a command whose own output is piped, still run in their own session
80+
- A `shell` command piped to an interactive program, such as `shell git log | less`, now joins
81+
the pipeline's job, so both processes receive Ctrl-C and Ctrl-Z
82+
- On Windows, fixed piped output appearing garbled in console programs such as `more`
83+
(`help -v | more`), a regression in 4.2.4. Pipes are written as UTF-8, but console programs
84+
decode their input with the console's code page. While a pipe or the pager runs, cmd2 now sets
85+
the console to UTF-8 (code page 65001, as `chcp 65001` does) and restores its code pages
86+
afterward, so console programs and UTF-8 tools such as `rg` both read the output correctly
87+
- When copying a command's output to the clipboard (`help >`) fails, later commands' output is
88+
no longer written to the temporary file that held it
89+
- When a pipe's process cannot be started, for instance because no more processes can be created
90+
or `$SHELL` names a program that cannot run, both ends of the pipe are now closed rather than
91+
left open
92+
- When a pipe's process exits before the command runs, what it wrote, such as the shell's
93+
"command not found", is no longer lost when cmd2 captures the output, as in a pyscript
94+
6495
## 4.2.4 (September 8, 2026)
6596

6697
- Bug Fixes

‎CLAUDE.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ Three layers, all producing a `Cmd2ArgumentParser`:
7171
range `nargs` tuples, per-argument completion metadata, and subcommand records.
7272
- `cmd2/decorators.py` — `@with_argparser`, `@with_argument_list`, `@with_category`,
7373
`@as_subcommand_to` attach parsers/metadata to `do_*` methods.
74-
- `cmd2/annotated.py` — the newer, still-experimental Typer-style path: `@with_annotated` builds a
75-
parser from a function's type hints, with `Argument`/`Option` metadata via `typing.Annotated`.
74+
- `cmd2/annotated.py` — the newer Typer-style path (experimental in 4.0.0, stable as of 4.3.0):
75+
`@with_annotated` builds a parser from a function's type hints, with `Argument`/`Option` metadata
76+
via `typing.Annotated`.
7677

7778
Parsers are built lazily and cached by the `CommandParsers` class in `cmd2.py` (`_build_parser`), so
7879
that `CommandSet`-supplied subcommands can be attached and detached at runtime.
@@ -111,10 +112,12 @@ embedded Python/IPython shells and `run_pyscript` while keeping isolation.
111112
- Anything not documented under `docs/api/` is not public API (`cmd2/constants.py` says so
112113
explicitly).
113114
- Add user-visible changes to `CHANGELOG.md` under the current in-progress version heading.
114-
- `main` is the branch for the next PATCH release; MAJOR/MINOR work happens on a branch named for
115-
the target version. Releases are tagged and published from `main`.
115+
- `main` is the branch for the next release, whether PATCH, MINOR, or MAJOR. Feature branches merge
116+
into `main`, and all releases are tagged and published from it.
116117
- Do not commit spec, plan, or markdown documents without asking first. Save plans to
117118
`~/.superpowers/plans/` rather than the project directory.
119+
- This project uses a 127 character maximum line length for all Python code, including for comments.
120+
- This project uses a 100 character maximum line length for Markdown files.
118121

119122
## Commit conventions
120123

0 commit comments

Comments
 (0)