Skip to content

gh-155207: Add --dry-run and --diff options to Argument Clinic - #155208

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:clinic-dry-run
Aug 5, 2026
Merged

gh-155207: Add --dry-run and --diff options to Argument Clinic#155208
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:clinic-dry-run

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 5, 2026

Copy link
Copy Markdown
Member

With --dry-run Argument Clinic writes nothing and only lists the files which would be changed.

With --diff it writes a unified diff of the changes to the standard output instead, so that they can be reviewed or applied with patch -p0.

No file and no directory is created or modified in these modes, and the progress reported by -v is written to the standard error stream, so that the standard output contains only the report.

--dry-run lists the files which would be changed, and --diff writes
a unified diff of the changes to the standard output.  No file and no
directory is created or modified in these modes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The path of the default destination file is built from the
"{dirname}/clinic/{basename}.h" template, so it always uses forward
slashes, unlike os.path.join().

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 5, 2026 07:26
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 5, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 3874ad1 into python:main Aug 5, 2026
65 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155213 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 5, 2026
@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155214 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 5, 2026
@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155215 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 5, 2026
@serhiy-storchaka
serhiy-storchaka deleted the clinic-dry-run branch August 5, 2026 07:32
serhiy-storchaka added a commit that referenced this pull request Aug 5, 2026
…GH-155208) (GH-155214)

--dry-run lists the files which would be changed, and --diff writes
a unified diff of the changes to the standard output.  No file and no
directory is created or modified in these modes.
(cherry picked from commit 3874ad1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Aug 5, 2026
…GH-155208) (GH-155215)

--dry-run lists the files which would be changed, and --diff writes
a unified diff of the changes to the standard output.  No file and no
directory is created or modified in these modes.
(cherry picked from commit 3874ad1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
deadlovelll pushed a commit to deadlovelll/cpython that referenced this pull request Aug 5, 2026
…Clinic (pythonGH-155208) (pythonGH-155214)

--dry-run lists the files which would be changed, and --diff writes
a unified diff of the changes to the standard output.  No file and no
directory is created or modified in these modes.
(cherry picked from commit 3874ad1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant