[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2021-03-05 Thread Jason R. Coombs
Jason R. Coombs added the comment: I suspect change in this issue led to issue43413. -- nosy: +jaraco ___ Python tracker ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2018-09-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Convert heapq to the argument clinic ___ Python tracker ___ ___ Python-bugs-list

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0b5615926a573c19c887a701a2f7047f4fd06de6 by Serhiy Storchaka in branch 'master': bpo-20186: Convert tuple object implementation to Argument Clinic. (#614) https://github.com/python/cpython/commit/0b5615926a573c19c887a701a2f7047f4fd06de6

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-03-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 614: Objects/tupleobject.c -- ___ Python tracker ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-03-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +507 ___ Python tracker ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5762cf299f863e06244e6b44ba3a91efee7b35c1 by Serhiy Storchaka in branch 'master': Issue #20186: Regenerated Argument Clinic. https://github.com/python/cpython/commit/5762cf299f863e06244e6b44ba3a91efee7b35c1 --

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ccb3ad39ee4 by Serhiy Storchaka in branch 'default': Issue #20186: Regenerated Argument Clinic. https://hg.python.org/cpython/rev/8ccb3ad39ee4 -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0ef37ec83f337b4b77275b367288a5656a0682c by Serhiy Storchaka in branch 'master': Issue #20186: Converted the symtable module to Argument Clinic. https://github.com/python/cpython/commit/b0ef37ec83f337b4b77275b367288a5656a0682c New changeset

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1df73b46094 by Serhiy Storchaka in branch 'default': Issue #20186: Converted the tracemalloc module to Argument Clinic. https://hg.python.org/cpython/rev/e1df73b46094 -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7f8a3eb3459e by Serhiy Storchaka in branch 'default': Issue #20186: Converted the symtable module to Argument Clinic. https://hg.python.org/cpython/rev/7f8a3eb3459e -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem with lsprof_clinic.patch is that it exposes default value of _lsprof.Profiler.enable() parameters as -1. Actually _lsprof.Profiler.enable() should accept boolean arguments without default value. --

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Argument Clinic generates incorrect parsing code for _csv.field_size_limit(). -- ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46362/enumobject-docstrings.patch ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that restores ol docstrings for enumerate() and reversed(). But it may be better to change pydoc so that it would output a text signature of class constructor if available. -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Microbenchmarks: $ ./python -m perf timeit --duplicate 100 "enumerate('abc')" Unpatched: Median +- std dev: 1.76 us +- 0.10 us Patched:Median +- std dev: 1.61 us +- 0.07 us $ ./python -m perf timeit --duplicate 100 "enumerate('abc', 1)" Unpatched:

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: When reviewing AC patches, we should always compare the help() before and after. Also, if the code already had fast parsing like: if (!PyArg_UnpackTuple(args, "reversed", 1, 1, ) ) there needs to be a before and after timing to make sure there wasn't a

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: The application of AC to enumerate() lost information about the start argument and the signature of the call. We're going backwards. New help - class enumerate(object) | Return an enumerate

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are patches based on modules_issue20186.patch that convert to Argument Clinic 4 modules: _csv, _lsprof, _tracemalloc and symtable. They are synchronized with current sources and updated to current Argument Clinic. Other changes: * Addressed Larry's

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Tal Einat
Tal Einat added the comment: Serhiy, no apology is required. On the contrary, thank you for the taking the time to review this and commit, I don't have time available for this these days. -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for committing patches for you Tal, but they were hanging so long time. -- ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3db9bccff3f by Serhiy Storchaka in branch 'default': Issue #20186: Converted builtins enumerate() and reversed() to Argument Clinic. https://hg.python.org/cpython/rev/e3db9bccff3f -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue20186.enumobject.patch LGTM too. -- ___ Python tracker ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue20186.mathmodule.v2.patch needed just synchronizing docstrings. -- ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 112f27b8c8ea by Serhiy Storchaka in branch 'default': Issue #20186: Converted the math module to Argument Clinic. https://hg.python.org/cpython/rev/112f27b8c8ea -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The only change I made is used the return converter in length_hint(). -- versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2017-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3713f7de576d by Serhiy Storchaka in branch 'default': Issue #20186: Converted the _operator module to Argument Clinic. https://hg.python.org/cpython/rev/3713f7de576d -- ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-19 Thread Tal Einat
Tal Einat added the comment: My patches haven't been looked at for a while, anyone considering them should make sure they still apply cleanly and don't break anything. Here their status as far as I can tell: Quite a bit of work went into Modules/_operator.c, and it got an "LGTM" from Serhiy,

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-19 Thread Larry Hastings
Larry Hastings added the comment: >Modules/_opcode.c: Issue 19674 (3.4). Only one function I can see there > (Larry’s original post says two sites). I produced the post with a big grep through the codebase. Which was quite a while ago now. Code changes and moves around; if you can only

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-18 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2016-03-18 Thread Martin Panter
Martin Panter added the comment: Summary of the work here as I pass through :) Files already done: Objects/memoryobject.c: converted to signatures without Arg Clinic (Py 3.5) Modules/_opcode.c: Issue 19674 (3.4). Only one function I can see there (Larry’s original post says two sites).

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Attached is a revised patch for Modules/mathmodule.c incorporating changes suggested by Serhiy in his review. The major change is the reformatting of the doc-strings of most of the functions in the module to use the same format as doc-strings generated by AC.

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there any performance difference? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Tal Einat
Tal Einat added the comment: I tried running the pystone benchmark, but the results were inconclusive. I saw very large differences (up to 20%) between runs at different times, with no clear differences with or without the patch. However, a quick search shows that the operator module is

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Tal Einat
Tal Einat added the comment: Attached is a patch for all of _operator except for itemgetter, attrgetter and methodcaller. The entire test suite passes after applying this patch. Using AC has allowed the removal of all of the cryptic spam*() macros in the code, making it much more

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Tal Einat
Tal Einat added the comment: Attached a slightly revised patch thanks to Serhiy's review. In addition to Serhiy's remarks, I used _operator._compare_digest = _operator.eq to reduce a bit more boilerplate. -- Added file: http://bugs.python.org/file39654/issue20186._operator.v2.patch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The operator module is rarely used in the stdlib, but if it is used in user code (mainly with map(), reduce() or like) the performance often is important. You can use microbenchmarks like following (operator.add is twice faster than lambda x, y: x + y).

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Tal Einat
Tal Einat added the comment: I just ran such microbenchmarks for operator.add and operator.not_, and saw no significant difference with or without the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-07 Thread Tal Einat
Tal Einat added the comment: Here's another complete conversion patch for _operator. As suggested by Serhiy, I changed the comparison operators to copy the signature from _operator.eq() instead of _operator.lt(), which is easier to understand. -- Added file:

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-03 Thread Tal Einat
Tal Einat added the comment: Should Argument Clinic conversion patches still be against the 'default' branch, and not 3.5, even though they don't include any functionality changes? -- ___ Python tracker rep...@bugs.python.org

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-03 Thread Tal Einat
Tal Einat added the comment: Attached is an updated patch for Modules/mathmodule.c. This is based on Georg's patch, updated to apply to current 3.5, with several improvements: * replaced legacy converters * converted math.ceil() and math.floor() functions * converted the new math.gcd() and

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-06-03 Thread Tal Einat
Tal Einat added the comment: Attached is an AC conversion patch for Objects/enumobject.c. Note that this file contains the implementations of the 'enumerate' and 'reversed' classes, but *not* the 'Enum' class. This is based on the 3.5 branch. -- Added file:

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2015-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Argument Clinic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___ ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-10-14 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: -skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___ ___ Python-bugs-list

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-08-04 Thread Larry Hastings
Larry Hastings added the comment: All the Derby patches should only go into trunk at this point. -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 060cfd049d14 by Stefan Krah in branch 'default': Issue #20186: memoryobject.c: add function signatures. http://hg.python.org/cpython/rev/060cfd049d14 -- nosy: +python-dev ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-05-17 Thread Stefan Krah
Stefan Krah added the comment: memoryobject.c is converted with a minimal patch (I would like to keep 100% code coverage for the file). -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: OK, here's a patch for _csv. Two problems here: First problem is the __new__ method of the Dialect class: * it has no docstring and no methoddef entry * it is a class method, but the first arg is conventionally called type I tried to hack something into clinic

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Tried to tackle symtable -- it uses an O converter. The clinic howto says ``'O'````object(converter='name_of_c_function')`` but Traceback (most recent call last): File Tools/clinic/clinic.py, line 2817, in module sys.exit(main(sys.argv[1:])) File

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: _tracemalloc converted. Its existing docstrings did use the func(arg: argtype) - rettype convention. Is there a way in clinic to retain that? -- Added file: http://bugs.python.org/file33423/tracemalloc_clinic.patch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Here's _iomodule. _io.open has a whopping 100-line docstring, which is ... unfortunate ... to have duplicated in the file :) -- Added file: http://bugs.python.org/file33424/io_clinic.patch ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: And _heapq. No problems there, except that it also used - return annotations in the docstring. -- Added file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker rep...@bugs.python.org

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: And lsprof. -- Added file: http://bugs.python.org/file33426/lsprof_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33419/mathmodule_part1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33422/csv_module_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33423/tracemalloc_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33424/io_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33426/lsprof_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: OK, new patches coming in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___ ___ Python-bugs-list mailing

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Actually I put all I have in one. Rietveld doesn't care. The mathmodule still awaits some kind of solution for the macro atrocities. Objects will be attacked next. -- Added file: http://bugs.python.org/file33442/modules_issue20186.patch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: Looking at _csv.c, I see a few functions using PyArg_UnpackTuple. They should be converted too, no? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: Attached part 1 of mathmodule (17 functions). I'm looking forward to a suggestion for handling the rest (see FUNC1/1A/2 macros :) -- keywords: +patch Added file: http://bugs.python.org/file33419/mathmodule_part1.patch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Larry Hastings
Larry Hastings added the comment: 1) Wow. I never knew about PyArg_UnpackTuple. You're right, those should be converted too. Hooray, more entry points to convert. I'll write something up for the howto about UnpackTuple. I just did a quick check, and there are 96 entry points (by my count)

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-11 Thread Georg Brandl
Georg Brandl added the comment: Wow. I never knew about PyArg_UnpackTuple. You're right, those should be converted too. Hooray, more entry points to convert. I'll write something up for the howto about UnpackTuple. One thing to note is that (at least in math) many instances of

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-07 Thread Larry Hastings
New submission from Larry Hastings: This issue is part of the Great Argument Clinic Conversion Derby, where we're trying to convert as much of Python 3.4 to use Argument Clinic as we can before Release Candidate 1 on January 19. This issue asks you to change the following bundle of files: