Skip to content

[3.14] gh-64502: Fix Argument Clinic support of optional groups with defaults (GH-155191) - #155216

Merged
serhiy-storchaka merged 2 commits into
python:3.14from
serhiy-storchaka:backport-caac9278-3.14
Aug 5, 2026
Merged

[3.14] gh-64502: Fix Argument Clinic support of optional groups with defaults (GH-155191)#155216
serhiy-storchaka merged 2 commits into
python:3.14from
serhiy-storchaka:backport-caac9278-3.14

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

Parameters with a default value which are not in any group were always
required in the generated argument parsing code, although they were
rendered as optional in the signature. They can now be omitted, and
ambiguous combinations of optional groups and parameters with a default
value are rejected.
(cherry picked from commit caac927)

Co-authored-by: Serhiy Storchaka [email protected]
Co-Authored-By: Claude Opus 5 (1M context) [email protected]

…efaults (pythonGH-155191)

Parameters with a default value which are not in any group were always
required in the generated argument parsing code, although they were
rendered as optional in the signature.  They can now be omitted, and
ambiguous combinations of optional groups and parameters with a default
value are rejected.
(cherry picked from commit caac927)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…c header

The added test functions made Modules/clinic/_testclinic.c.h exceed the
limit.  The main and 3.15 branches already use the larger value.

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@serhiy-storchaka
serhiy-storchaka merged commit 065a910 into python:3.14 Aug 5, 2026
57 checks passed
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