Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from May 26, 2023

Conversation

Glyphack
Copy link
Contributor

@Glyphack Glyphack commented May 26, 2023

@cpython-cla-bot
Copy link

cpython-cla-bot bot commented May 26, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Member

@carljm carljm left a comment

Choose a reason for hiding this comment

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

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.

@@ -1820,7 +1820,7 @@ Function and class definitions
type_ignores=[])


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

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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

@JelleZijlstra JelleZijlstra added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels May 26, 2023
@carljm carljm merged commit 61c1d67 into python:main May 26, 2023
27 checks passed
@miss-islington
Copy link
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>
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label May 26, 2023
@bedevere-bot
Copy link

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

@bedevere-bot 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>
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