Skip to content

Fix support of var-positional parameter in Argument Clinic #122688

Description

@serhiy-storchaka

Currently Argument Clinic with a var-positional parameter is only used in few functions (print(), the TypeVar constructor (see #118814) and several set methods), so this is not well tested.

There are several bugs here:

  • Keyword-only parameters after the var-positional parameter are marked as positional-or-keyword parameters.
  • The number of required arguments for keyword-only parameters was calculated incorrectly.
  • Some invalid combination of the var-positional parameter with /, * and deprecation markers are not forbidden or produce unrelated errors.

Linked PRs

Activity

  1. added 3 commits that reference this issue on Aug 5, 2024
  2. serhiy-storchaka commented on Aug 9, 2024

    @serhiy-storchaka
    MemberAuthor

    Due to refactoring it is difficult to backport this change to 3.12. This is not such important, because these corner cases are not used in CPython for now.

    But I am planning to merge it in 3.13 after release, to help backporting future bugfixes. I am currently working on significant rewriting of the code for this feature, and found few other errors.

  3. added 2 commits that reference this issue on Aug 11, 2024
  4. added 2 commits that reference this issue on Aug 22, 2024
  5. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions