Issue 23944: Argument Clinic: wrap impl's declaration if it's too long (original) (raw)

Issue23944

Created on 2015-04-14 02:28 by zach.ware, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
_winapi.c zach.ware,2015-04-14 18:24
larry.clinic.wrap.long.impl.decls.1.txt larry,2015-04-14 19:33 review
larry.clinic.wrap.long.impl.decls.2.txt larry,2015-04-14 19:52 review
Messages (12)
msg240831 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 02:28
For example: _winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name, DWORD desired_access, DWORD share_mode, LPSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file)
msg240834 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-04-14 03:06
If you give me a test case I'll knock this out.
msg240835 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 03:12
Will do in the morning.
msg240966 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 18:03
Larry: Here's your sample: /*[clinic input] _winapi.CreateProcess application_name: Py_UNICODE(nullable=True) command_line: Py_UNICODE(nullable=True) proc_attrs: object Ignored internally, can be None. thread_attrs: object Ignored internally, can be None. inherit_handles: BOOL creation_flags: DWORD env_mapping: object current_directory: Py_UNICODE(nullable=True) startup_info: object / Create a new process and its primary thread. The return value is a tuple of the process handle, thread handle, process ID, and thread ID. [clinic start generated code]*/ static PyObject * _winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name, Py_UNICODE *command_line, PyObject *proc_attrs, PyObject *thread_attrs, BOOL inherit_handles, DWORD creation_flags, PyObject *env_mapping, Py_UNICODE *current_directory, PyObject *startup_info) /*[clinic end generated code: output=c279c1271b4c45cf input=6667ea0bc7036472]*/
msg240977 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-04-14 18:22
I wish the Python bug tracker had a way of attaching files to issues, so we didn't have to just copy and paste into and out of the comments. Ah well, wishful thinking!
msg240978 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 18:23
Alright, alright, I'll get you a file. On Tue, Apr 14, 2015 at 1:22 PM, Larry Hastings <report@bugs.python.org> wrote: > > Larry Hastings added the comment: > > I wish the Python bug tracker had a way of attaching files to issues, so we didn't have to just copy and paste into and out of the comments. Ah well, wishful thinking! > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue23944> > _______________________________________
msg240979 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 18:24
You can even have the whole thing, with lots of samples :)
msg240981 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-04-14 18:25
That's AMAZING, you mean the web site knew how to do that THE WHOLE TIME?
msg240995 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-04-14 19:33
Attached is a patch. This causes a lot of churn, darn. Should I copy & paste the patch into this text box too? Maybe that would be more convenient!
msg241000 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2015-04-14 19:52
Okay, this patch is about half the size. I had a bug that was throwing away some important syntax. With this patch applied, Python builds and the test suite is as reasonable as usual. I swear, C compilers are so fussy sometimes!
msg241015 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-04-14 20:33
After an English lesson, looks fine to me.
msg241040 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-14 22:09
New changeset c99ca3d7052d by Larry Hastings in branch 'default': Issue #23944: Argument Clinic now wraps long impl prototypes at column 78. https://hg.python.org/cpython/rev/c99ca3d7052d
History
Date User Action Args
2022-04-11 14:58:15 admin set github: 68132
2015-04-14 22:09:20 larry set status: open -> closedassignee: larryresolution: fixedstage: needs patch -> resolved
2015-04-14 22:09:02 python-dev set nosy: + python-devmessages: +
2015-04-14 20:33:24 zach.ware set messages: +
2015-04-14 19:52:35 larry set files: + larry.clinic.wrap.long.impl.decls.2.txtmessages: +
2015-04-14 19:33:23 larry set files: + larry.clinic.wrap.long.impl.decls.1.txtmessages: +
2015-04-14 18:25:35 larry set messages: +
2015-04-14 18:24:44 zach.ware set files: + _winapi.cmessages: +
2015-04-14 18:23:29 zach.ware set messages: +
2015-04-14 18:22:18 larry set messages: +
2015-04-14 18:03:17 zach.ware set messages: +
2015-04-14 03:12:09 zach.ware set messages: +
2015-04-14 03:06:54 larry set messages: +
2015-04-14 02:28:04 zach.ware create