Skip to content

MAINT: Remove the deprecated print-scenario command from pyrit_shell - #4428

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
khushi-git-7:maint/4394-print-scenario
Nov 22, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
khushi-git-7:maint/4394-print-scenario

Conversation

@khushi-git-7

Copy link
Copy Markdown
Contributor

Description

Removes the deprecated print-scenario shell command, due in 1.3.0. scenario-results <id> behaves as before. Closes #4394.

  • Removes do_print_scenario and its line in the command overview, so print-scenario now falls through to the shell's usual "Unknown command" handling.
  • Tests: the success (empty completed run) and error tests now call do_scenario_results, since those two cases weren't covered for it yet. The no-argument case was already covered by test_no_args_prints_usage, and the deprecation-warning test is removed. The test class and docstring no longer mention the alias.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the removal of the deprecated command.

No open issues 🎉

What changed in this PR

Removes the deprecated print-scenario command ahead of PyRIT 1.3.0, addressing #4394 while preserving scenario-results behavior.

Changes:

  • Removes the alias handler and command overview entry, leaving print-scenario to normal unknown-command handling.
  • Moves success and error tests to scenario-results and removes obsolete alias-specific tests.
File Description
tests/​unit/​cli/​test_pyrit_shell.py Preserves result-printing coverage under scenario-results and removes alias references.
pyrit/​cli/​pyrit_shell.py Removes the deprecated command handler and its help entry.

Review effort: Balanced

…eported

TestDoScenarioResults.test_fetch_error_is_reported already covers the
scenario-results fetch-error path with the same mock and assertion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 22, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged via the queue into microsoft:main with commit 3dff94d Nov 22, 2026
1 check passed
@khushi-git-7

Copy link
Copy Markdown
Contributor Author

Thanks for trimming the duplicate test and merging, Roman Lutz (@romanlutz).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAINT: Remove the deprecated print-scenario command from pyrit_shell (due in 1.3.0)

3 participants