Skip to content

gh-125028: Prohibit placeholders in partial keywords #126062

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

Merged

Conversation

dg-pb
Copy link
Contributor

@dg-pb dg-pb commented Oct 28, 2024

@dg-pb dg-pb marked this pull request as draft October 30, 2024 08:59
@dg-pb dg-pb marked this pull request as ready for review October 30, 2024 10:16
dg-pb and others added 2 commits January 5, 2025 10:03
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
dg-pb and others added 2 commits January 5, 2025 14:56
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Please amend Doc/library/functools.rst and Doc/whatsnew/3.14.rst as needed.

@bedevere-app
Copy link

bedevere-app bot commented Jan 5, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@dg-pb
Copy link
Contributor Author

dg-pb commented Jan 5, 2025

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Jan 5, 2025

Thanks for making the requested changes!

@erlend-aasland: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from erlend-aasland January 5, 2025 21:40
@erlend-aasland
Copy link
Contributor

Thanks, looks good to me. I'd like Serhiy's eyes on it also.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@dg-pb
Copy link
Contributor Author

dg-pb commented May 8, 2025

@rhettinger, @serhiy-storchaka
This is API adjustment for new feature, thus I think it would be good to merge this before 3.14 release. Given it is a fairly small one, maybe it would be good to get it out of the way sooner than later?


Also, what are your thoughts on:

  1. gh-119109: improve functools.partial vectorcall with keywords #124584 - in addition to intended improvements this one solves current free-threading issue (the last one in that series) - Race between partial_vectorcall_fallback and _PyVectorcall_FunctionInline under free-threading #128050
  2. gh-124652: partialmethod simplifications #124788 - this one would simplify some complexity in inspect and make partialmethod a bit more performant

Should either of the above be aimed to be merged before 3.14 or is it not of importance?

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

It should go in 3.14, no question. It is much easier to prohibit this in 3.14, that in any following version, when we would need to pass through a deprecation process. On other hand, we can allow Placeholder as a keyword argument at any time if it is needed.

@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 8, 2025
@serhiy-storchaka serhiy-storchaka merged commit afed5f8 into python:main May 8, 2025
43 checks passed
@miss-islington-app
Copy link

Thanks @dg-pb for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2025
…126062)

(cherry picked from commit afed5f8)

Co-authored-by: dgpb <3577712+dg-pb@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented May 8, 2025

GH-133645 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 May 8, 2025
serhiy-storchaka pushed a commit that referenced this pull request May 8, 2025
… (GH-133645)

(cherry picked from commit afed5f8)

Co-authored-by: dgpb <3577712+dg-pb@users.noreply.github.com>
@dg-pb dg-pb deleted the gh-125028-prohibit-kw-placeholders branch May 8, 2025 11:57
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.

4 participants