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-114258: Argument Clinic: refactor getset implementation #116170

Merged
merged 6 commits into from Mar 4, 2024

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Mar 1, 2024

Yak-shaving for type slot support:

  • move param corner case fail() from the generator to the parser
  • assign a return converter for setters during parsing, instead of hacking the output generator
  • rename the "init return converter" to "type slot int return converter"

TODO:

  • remove the implicitly added @setter param; instead require this to be specified (for a follow-up PR)

@erlend-aasland
Copy link
Contributor Author

I'm not quite sure about cde8a6d, though.

Tools/clinic/clinic.py Outdated Show resolved Hide resolved
Lib/test/clinic.test.c Outdated Show resolved Hide resolved
@erlend-aasland erlend-aasland marked this pull request as ready for review March 1, 2024 17:50
@corona10
Copy link
Member

corona10 commented Mar 4, 2024

I will take a look by today.

@corona10 corona10 self-assigned this Mar 4, 2024
Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

LGTM :)

@erlend-aasland
Copy link
Contributor Author

Thanks for the review, Donghee!

@erlend-aasland erlend-aasland merged commit cfbdce7 into python:main Mar 4, 2024
42 checks passed
@erlend-aasland erlend-aasland deleted the clinic/refactor-getset branch March 4, 2024 12:51
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…hon#116170)

* Move param guard to param state machine
* Override return converter during parsing
* Don't use a custom type slot return converter; instead
  special case type slot functions during generation.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…hon#116170)

* Move param guard to param state machine
* Override return converter during parsing
* Don't use a custom type slot return converter; instead
  special case type slot functions during generation.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…hon#116170)

* Move param guard to param state machine
* Override return converter during parsing
* Don't use a custom type slot return converter; instead
  special case type slot functions during generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants