This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Clinic fixes: add converters with length, version directive, "self converter"
Type: behavior Stage: resolved
Components: Build Versions: Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: brett.cannon, larry, ncoghlan, pitrou, python-dev
Priority: normal Keywords: patch

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

File name Uploaded Description Edit larry, 2013-11-23 02:28 review 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: Nick 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
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 63929
2013-11-23 22:54:56larrysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-11-23 22:54:35python-devsetnosy: + python-dev
messages: + msg204124
2013-11-23 22:10:17larrysetfiles: +

messages: + msg204115
title: Clinic fixes: add converters with length, version directive -> Clinic fixes: add converters with length, version directive, "self converter"
2013-11-23 14:41:23ncoghlansetmessages: + msg204036
2013-11-23 13:55:58pitrousetmessages: + msg204016
2013-11-23 02:28:12larrycreate