You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clinic fixes: add converters with length, version directive, "self converter" #63929
Added a "version" directive, so a programmer can require a
specific version (or better) of Clinic.
Finished off support for all the 'legacy' converters. The ones today
were those that give off a "length" parameter. This was complicated
by finally dealing properly with the Py_buffer conversion stuff.
To properly handle length parameters, I had to support PY_SSIZE_T_CLEAN being turned off (when are we gonna throw that away?). So I added a new type to pyports.h, Py_ssize_clean_t, which is either an int or a Py_ssize_t depending on PY_SSIZE_T_CLEAN.
I've run out of gas and am going to bed. I know I have two TODO items in the diff so far; I'll deal with those tomorrow. But can I get a quick review of the rest, so I can get this in tomorrow?
Attached is a fresh patch. I added a third new feature: the "self converter", which allows you to change the type of (or rename) self. For an example of its use, check out dbm.dbm.get in Modules/_dbmmodule.c.
changed the title [-]Clinic fixes: add converters with length, version directive[/-][+]Clinic fixes: add converters with length, version directive, "self converter"[/+]on Nov 23, 2013
Activity
larryhastings commentedon Nov 23, 2013
Two minor changes for Argument Clinic.
Added a "version" directive, so a programmer can require a
specific version (or better) of Clinic.
Finished off support for all the 'legacy' converters. The ones today
were those that give off a "length" parameter. This was complicated
by finally dealing properly with the Py_buffer conversion stuff.
To properly handle length parameters, I had to support PY_SSIZE_T_CLEAN being turned off (when are we gonna throw that away?). So I added a new type to pyports.h, Py_ssize_clean_t, which is either an int or a Py_ssize_t depending on PY_SSIZE_T_CLEAN.
I've run out of gas and am going to bed. I know I have two TODO items in the diff so far; I'll deal with those tomorrow. But can I get a quick review of the rest, so I can get this in tomorrow?
pitrou commentedon Nov 23, 2013
Argument Clinic is an internal tool, so I don't think it's bound by the feature freeze.
(and, besides, you are the RM :-))
ncoghlan commentedon Nov 23, 2013
+1 to what Antoine said - keeping the initial iteration internal only
actually buys us some time :)
larryhastings commentedon Nov 23, 2013
Attached is a fresh patch. I added a third new feature: the "self converter", which allows you to change the type of (or rename) self. For an example of its use, check out dbm.dbm.get in Modules/_dbmmodule.c.
[-]Clinic fixes: add converters with length, version directive[/-][+]Clinic fixes: add converters with length, version directive, "self converter"[/+]python-dev commentedon Nov 23, 2013
New changeset 760ccd78e874 by Larry Hastings in branch 'default':
Issue bpo-19730: Argument Clinic now supports all the existing PyArg
http://hg.python.org/cpython/rev/760ccd78e874
pythongh-113336: Remove the 'version' directive from Argument Clinic
gh-113336: Remove the 'version' directive from Argument Clinic (#113341)
pythongh-113336: Remove the 'version' directive from Argument Clinic (p…
pythongh-113336: Remove the 'version' directive from Argument Clinic (p…
pythongh-113336: Remove the 'version' directive from Argument Clinic (p…
pythongh-113336: Remove the 'version' directive from Argument Clinic (p…