You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c #64370
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: Modules/_cursesmodule.c: 115 sites
Talk to me (larry) if you only want to attack part of a bundle.
Here is half-baked (just for demonstration) patch for the _curses and _curses_panel modules.
Known issues:
The chgat, getstr, and instr methods have signatures which can't be processed by current Argument Clinic (bpo-20303).
Signatures of the noutrefresh and refresh methods depends on compile-time options.
Many other functions are defined optionally. But the #ifdef trick doesn't work with side file destination.
A lot of functions are generated by preprocessor. We can't use Argument Clinic for them (if not increase the volume of code too much). I think preprocessor should be used to generate docstrings with signature (done in the _curses_panel module).
Functions in these modules have not docstrings at all. I try to add docstrings (simplified descriptions from the documentation file), but may be we should do this in separate issue.
I have temporary added the window class to the _curses module and the panel classes to the _curses_panel modules. Now you can examine docstrings of _curses.window and _curses_panel.panel with pydoc.
PR 4251 converts most of functions in the _curses and _curses_panel modules (around 130 functions) to Argument Clinic. Many functions didn't have docstrings, the PR adds them. You can test new signatures and docstrings by the following commands:
3 functions can't be converted. The initial versions of Argument Clinic supported such declarations, but now it doesn't support them. Will try to fix Argument Clinic in other issue. Yet 35 generated window methods have not been converted because I'm too tired by this patch. They will be converted by other patches.
I tried to make new and existing docstrings short and clear, but I think many docstrings still need editing.
New changeset b00854c by Serhiy Storchaka in branch 'master': bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. (GH-4251) b00854c
Activity
larryhastings commentedon Jan 7, 2014
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:
Modules/_cursesmodule.c: 115 sites
Talk to me (larry) if you only want to attack part of a bundle.
For instructions on how to convert a function to work with Argument
Clinic, read the "howto":
http://docs.python.org/dev/howto/clinic.html
serhiy-storchaka commentedon Jan 18, 2014
I take it.
serhiy-storchaka commentedon Jan 20, 2014
Here is half-baked (just for demonstration) patch for the _curses and _curses_panel modules.
Known issues:
The chgat, getstr, and instr methods have signatures which can't be processed by current Argument Clinic (bpo-20303).
Signatures of the noutrefresh and refresh methods depends on compile-time options.
Many other functions are defined optionally. But the #ifdef trick doesn't work with side file destination.
A lot of functions are generated by preprocessor. We can't use Argument Clinic for them (if not increase the volume of code too much). I think preprocessor should be used to generate docstrings with signature (done in the _curses_panel module).
Functions in these modules have not docstrings at all. I try to add docstrings (simplified descriptions from the documentation file), but may be we should do this in separate issue.
I have temporary added the window class to the _curses module and the panel classes to the _curses_panel modules. Now you can examine docstrings of _curses.window and _curses_panel.panel with pydoc.
larryhastings commentedon Aug 4, 2014
All the Derby patches should only go into trunk at this point.
serhiy-storchaka commentedon May 5, 2015
Updated to the tip. Unfortunately, Argument Clinic now generates incorrect parsing code for some functions. Tests are failed.
serhiy-storchaka commentedon May 5, 2015
Fixed signatures generated with macro in _curses_panel.
serhiy-storchaka commentedon Nov 3, 2017
PR 4251 converts most of functions in the _curses and _curses_panel modules (around 130 functions) to Argument Clinic. Many functions didn't have docstrings, the PR adds them. You can test new signatures and docstrings by the following commands:
./python -m pydoc curses
./python -m pydoc curses.window
./python -m pydoc curses.panel
./python -m pydoc curses.panel.panel
3 functions can't be converted. The initial versions of Argument Clinic supported such declarations, but now it doesn't support them. Will try to fix Argument Clinic in other issue. Yet 35 generated window methods have not been converted because I'm too tired by this patch. They will be converted by other patches.
I tried to make new and existing docstrings short and clear, but I think many docstrings still need editing.
serhiy-storchaka commentedon May 10, 2018
New changeset b00854c by Serhiy Storchaka in branch 'master':
bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. (GH-4251)
b00854c
pablogsal commentedon Dec 29, 2018
Should we close this issue or is anything left in this Derby?