GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-85283: Extending Argument Clinic to support to use the limited C API. by shihai1991 · Pull Request #26080 · python/cpython Conversation
|
|
The test of Argument Clinic in: https://github.com/shihai1991/cpython/compare/main...shihai1991:clinic_support_limited_capi?expand=1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@larryhastings Hi, Larry. Would you mind to take a look? cc @vstinner |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Before I look at the patch: what is the purpose of it? Argument Clinic is an internal tool for CPython, it can use the full API. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yes. The Argument Clinic can use the full API. So this PR add an option to allow developer to use the limited C API or not. More details in: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| else: | ||
| parser_code = [normalize_snippet(""" | ||
| if (!PyArg_ParseTuple(args, "{format_units}:{name}", | ||
| if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Use the limited C API when using the use_limited_api flag, otherwise it'll use the unlimited C API.
Sorry for my delay.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| else: | ||
| declarations = ( | ||
| 'static const char * const _keywords[] = {{{keywords} NULL}};\n' | ||
| 'static _PyArg_Parser _parser = {{"{format_units}:{name}", _keywords, 0}};') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is not in the Limited API.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
OK, you are right. Thanks.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
After PEP 620 canceled, so I decide close this PR. I will reopen this PR when we continue update PEP 620, ref: python/peps#2923 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@vstinner would of course know best, but my impression of the intent of withdrawing PEP 620 was that neither would it be re-opened and updated later or nor would the remaining changes be abandoned (as most of them were completed or mostly completed already), but rather they would be broken up into smaller separate PEPs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@shihai1991, are you interested in reviving this effort? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Sure, of course. Sorry for my late replay ;) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.