Skip to content

gh-114258: Argument Clinic: refactor getset implementation - #116170

Merged
erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:clinic/refactor-getset
Mar 4, 2024
Merged

gh-114258: Argument Clinic: refactor getset implementation#116170
erlend-aasland merged 6 commits into
python:mainfrom
erlend-aasland:clinic/refactor-getset

Conversation

@erlend-aasland

@erlend-aaslanderlend-aasland commented Mar 1, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

I'm not quite sure about cde8a6d, though.

Comment threadTools/clinic/clinic.py Outdated
Comment threadLib/test/clinic.test.c Outdated
@erlend-aasland
erlend-aasland marked this pull request as ready for review March 1, 2024 17:50
@corona10

Copy link
Copy Markdown
Member

I will take a look by today.

@corona10corona10 self-assigned this Mar 4, 2024

@corona10corona10 left a comment

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.

LGTM :)

@erlend-aasland

Copy link
Copy Markdown
ContributorAuthor

Thanks for the review, Donghee!

@erlend-aasland
erlend-aasland merged commit cfbdce7 into python:mainMar 4, 2024
@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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@erlend-aasland@corona10