Issue 20171: Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c
Created on 2014-01-07 23:43 by larry, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| curses_clinic.patch | serhiy.storchaka, 2014-01-20 17:22 | review | ||
| curses_clinic_2.patch | serhiy.storchaka, 2015-05-05 09:32 | review | ||
| curses_clinic_3.patch | serhiy.storchaka, 2015-05-05 09:41 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4251 | merged | serhiy.storchaka, 2017-11-03 12:30 | |
| Messages (9) | |||
|---|---|---|---|
| msg207616 - (view) | Author: Larry Hastings (larry) * ![]() |
Date: 2014-01-07 23:43 | |
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
|
|||
| msg208408 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2014-01-18 18:23 | |
I take it. |
|||
| msg208555 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2014-01-20 17:22 | |
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 (issue20303). * 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. |
|||
| msg224754 - (view) | Author: Larry Hastings (larry) * ![]() |
Date: 2014-08-04 20:12 | |
All the Derby patches should only go into trunk at this point. |
|||
| msg242594 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-05-05 09:32 | |
Updated to the tip. Unfortunately, Argument Clinic now generates incorrect parsing code for some functions. Tests are failed. |
|||
| msg242595 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-05-05 09:41 | |
Fixed signatures generated with macro in _curses_panel. |
|||
| msg305475 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2017-11-03 12:43 | |
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. |
|||
| msg316352 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-05-10 08:27 | |
New changeset b00854caa080cec613496d3a5e1b0891c9ff83e6 by Serhiy Storchaka in branch 'master': bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. (GH-4251) https://github.com/python/cpython/commit/b00854caa080cec613496d3a5e1b0891c9ff83e6 |
|||
| msg332733 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2018-12-29 20:44 | |
Should we close this issue or is anything left in this Derby? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:56 | admin | set | github: 64370 |
| 2020-07-10 18:51:04 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-12-29 20:44:32 | pablogsal | set | nosy:
+ pablogsal messages: + msg332733 |
| 2018-05-10 08:27:33 | serhiy.storchaka | set | messages: + msg316352 |
| 2017-11-03 12:43:22 | serhiy.storchaka | set | messages:
+ msg305475 versions: + Python 3.7, - Python 3.5 |
| 2017-11-03 12:30:33 | serhiy.storchaka | set | stage: needs patch -> patch review pull_requests: + pull_request4213 |
| 2015-05-05 09:41:36 | serhiy.storchaka | set | files:
+ curses_clinic_3.patch messages: + msg242595 |
| 2015-05-05 09:32:57 | serhiy.storchaka | set | files:
+ curses_clinic_2.patch messages: + msg242594 |
| 2015-02-25 15:27:01 | serhiy.storchaka | set | components: + Argument Clinic |
| 2014-08-04 20:12:09 | larry | set | messages: + msg224754 |
| 2014-08-04 20:10:32 | larry | set | versions: + Python 3.5, - Python 3.4 |
| 2014-01-20 17:22:35 | serhiy.storchaka | set | files:
+ curses_clinic.patch keywords: + patch messages: + msg208555 |
| 2014-01-18 18:23:41 | serhiy.storchaka | set | assignee: serhiy.storchaka messages:
+ msg208408 |
| 2014-01-08 01:36:37 | r.david.murray | link | issue20187 dependencies |
| 2014-01-07 23:52:31 | larry | set | type: behavior -> enhancement |
| 2014-01-07 23:45:51 | larry | set | components: + Extension Modules, - Library (Lib) |
| 2014-01-07 23:43:56 | larry | create | |
