Issue 19730: Clinic fixes: add converters with length, version directive, "self converter" (original) (raw)

Created on 2013-11-23 02:28 by larry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
larry.misc.clinic.fixes.diff.1.patch larry,2013-11-23 02:28 review
larry.misc.clinic.fixes.diff.3.patch larry,2013-11-23 22:10
Messages (5)
msg203958 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-11-23 02:28
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?
msg204016 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-11-23 13:55
Argument Clinic is an internal tool, so I don't think it's bound by the feature freeze. (and, besides, you are the RM :-))
msg204036 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2013-11-23 14:41
+1 to what Antoine said - keeping the initial iteration internal only actually buys us some time :)
msg204115 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-11-23 22:10
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.
msg204124 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-11-23 22:54
New changeset 760ccd78e874 by Larry Hastings in branch 'default': Issue #19730: Argument Clinic now supports all the existing PyArg http://hg.python.org/cpython/rev/760ccd78e874
History
Date User Action Args
2022-04-11 14:57:54 admin set github: 63929
2013-11-23 22:54:56 larry set status: open -> closedresolution: fixedstage: patch review -> resolved
2013-11-23 22:54:35 python-dev set nosy: + python-devmessages: +
2013-11-23 22:10:17 larry set files: + larry.misc.clinic.fixes.diff.3.patchmessages: + title: Clinic fixes: add converters with length, version directive -> Clinic fixes: add converters with length, version directive, "self converter"
2013-11-23 14:41:23 ncoghlan set messages: +
2013-11-23 13:55:58 pitrou set messages: +
2013-11-23 02:28:12 larry create