← 返回首页
gh-104984: remove kwargs and starargs from Call & ClassDef by Glyphack · Pull Request #104986 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-104984: remove kwargs and starargs from Call & ClassDef#104986

Merged
carljm merged 1 commit into
python:mainfrom
Glyphack:main
May 26, 2023
Merged

gh-104984: remove kwargs and starargs from Call & ClassDef#104986
carljm merged 1 commit into
python:mainfrom
Glyphack:main

Conversation

Glyphack commented May 26, 2023
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

ghost commented May 26, 2023
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

carljm left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Thanks for the PR! I verified that these arguments (and attributes) indeed don't exist anymore. Impressive that nobody noticed this until now in the 8(!) years since they were removed.

Comment thread Doc/library/ast.rst


.. class:: ClassDef(name, bases, keywords, starargs, kwargs, body, decorator_list)
.. class:: ClassDef(name, bases, keywords, body, decorator_list)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

This is also now out of date with the implementation in main and 3.12 due to the addition of type_params argument in PEP 695, but that's being addressed in #104642

Still seems sensible to remove starargs and kwargs in this PR, and let @JelleZijlstra resolve the resulting conflict on this line in #104642

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Hmm, backporting this will mean that the PEP 695 docs PR won't backport cleanly, which may cause a bit more of a pain. @JelleZijlstra how do you prefer to handle this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Just merge this first, I'll take care of the backports

JelleZijlstra added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels May 26, 2023
carljm merged commit 61c1d67 into python:main May 26, 2023

Copy link
Copy Markdown
Contributor

Thanks @Glyphack for the PR, and @carljm for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 26, 2023
…honGH-104986) These fields are removed in python@025e9eb (cherry picked from commit 61c1d67) Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>

Copy link
Copy Markdown

GH-104987 is a backport of this pull request to the 3.12 branch.

bedevere-bot removed the needs backport to 3.12 only security fixes label May 26, 2023

Copy link
Copy Markdown

GH-104988 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label May 26, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 26, 2023
…honGH-104986) These fields are removed in python@025e9eb (cherry picked from commit 61c1d67) Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
carljm pushed a commit that referenced this pull request May 26, 2023
…-104986) (#104987) gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) These fields are removed in 025e9eb (cherry picked from commit 61c1d67) Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
AlexWaygood pushed a commit that referenced this pull request May 26, 2023
…-104986) (#104988) gh-104984: remove kwargs and starargs from Call & ClassDef (GH-104986) These fields are removed in 025e9eb (cherry picked from commit 61c1d67) Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

starargs and kwargs are removed from ClassDef and Call ast nodes

5 participants

Footer

© 2026 GitHub, Inc.