[issue20390] Argument Clinic rollup patch, 2014/01/25
Roundup Robot added the comment: New changeset 06b4fbb09c93 by Larry Hastings in branch 'default': Issue #20390: Removing detritus from Argument Clinic file preset name change. http://hg.python.org/cpython/rev/06b4fbb09c93 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
New submission from Larry Hastings: Rollup patch with a bunch of small fixes in it. Can I get a quick turnaround review on this? I'd like it to go in before today's beta is cut. Definitely the core change has to go in, but that's uncontroversial. Core: * _PyType_GetDocFromInternalDoc() and _PyType_GetTextSignatureFromInternalDoc() are now marked Py_LIMITED_API. Tools: * The default filename for the file preset is now: clinic/{filename}.h. * The class directive syntax has been extended with two new required arguments: typedef and type_object. typedef should be the equivalent C type for this Python class, presented as a pointer-to-type. type_object should be an expression that evaluates to a PyTypeObject * for this Python type. Example: class dict PyDictObject * PyDict_Type This was necessary for the next item. * If __new__ or __init__ functions did not use kwargs (or args), the PyArg_NoKeywords (or PyArg_NoPositional) calls generated are only run if the type object is an exact match. (Otherwise subclasses will not be allowed to start accepting those kinds of arguments.) * Argument Clinic now fails if you have required parameters after optional parameters. * Converters now have a new template they can inject code into: it's called modifiers, and code put there is run in the parsing function after argument parsing but before the call to the impl. modifiers is intended for converters that may want dynamic default values. An example string you might add: if ({name} == NULL)\nname = time(NULL); -- assignee: larry components: Demos and Tools files: larry.clinic.rollup.jan.25.diff.1.txt messages: 209205 nosy: larry, ncoghlan, serhiy.storchaka, zach.ware priority: normal severity: normal stage: patch review status: open title: Argument Clinic rollup patch, 2014/01/25 type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file33702/larry.clinic.rollup.jan.25.diff.1.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Nick Coghlan added the comment: LGTM, but I'm not familiar with Clinic's own code... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Serhiy Storchaka added the comment: Don't forget to use hg mv to rename existing side files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Serhiy Storchaka added the comment: _PyType_GetDocFromInternalDoc and _PyType_GetTextSignatureFromInternalDoc declarations are too long. could you please wrap them around? First parameter of class methods (e.g. dict.fromkeys) now has a type of object (PyDictObject *) instead of PyTypeObject * (or PyDict_Type *). There is redundant cast in dict___contains__: register PyDictObject *mp = (PyDictObject *)self; First parameter of static methods (e.g. str.maketrans) now has a type of object (PyUnicodeObject *) instead of void *. There is redundant cast in unicodedata_UCD_decimal_impl: PyUnicodeObject *v = (PyUnicodeObject *)unichr; Perhaps here should be os.path.dirname() instead of os.path.basename(): dirname = os.path.basename(destination.filename) The 'fail(Can't write to destination ' line is too long. And I think it will look better if use string formatting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: Thanks for the reviews, Nick and Serhiy, especially considering that the Rietveld link didn't work! Serhiy: I believe I fixed everything. There are no side files checked in yet. Can you give me another review? -- Added file: http://bugs.python.org/file33710/larry.clinic.rollup.jan.25.diff.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Changes by Larry Hastings la...@hastings.org: Removed file: http://bugs.python.org/file33710/larry.clinic.rollup.jan.25.diff.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: Hang on, my tree was out of date. Which is why I didn't get a review link, duh. And if side files have appeared I'll fix 'em. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: Okay, here's my revised patch, for real this time, with hg mv for the side files and everything. -- Added file: http://bugs.python.org/file33711/larry.clinic.rollup.jan.25.diff.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: Oops, I goofed up moving _lzamodule.clinic.c.h. I'll fix that locally, won't regenerate the patch just for that (unless you ask me to). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: No, wait, I think it's fine, it was just some detritus in my directory throwing me off. But hg stat looks correct. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: I don't know why it's refusing to generate the review link. The patch applies cleanly to trunk, even now, hours later. Maybe it doesn't like file moves? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Roundup Robot added the comment: New changeset 9c5b421cc7de by Larry Hastings in branch 'default': Issue #20390: Small fixes and improvements for Argument Clinic. http://hg.python.org/cpython/rev/9c5b421cc7de -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Roundup Robot added the comment: New changeset 1435d2fe8e34 by Larry Hastings in branch 'default': Issue #20390: Final fix, for generating NoPositional/NoKeyword for __init__ calls. http://hg.python.org/cpython/rev/1435d2fe8e34 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Serhiy Storchaka added the comment: Rietveld doesn't like patches against out of date tree. And unfortunately it doesn't like patches in git format. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20390] Argument Clinic rollup patch, 2014/01/25
Larry Hastings added the comment: I don't know about diff #1, but diff #2 definitely applied cleanly against a fresh trunk at 8:22pm local time. I've turned off git format. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20390 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com