This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Convert the remaining os funtions to Argument Clinic
Type: enhancement Stage: resolved
Components: Argument Clinic, Extension Modules Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: larry, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2020-04-04 12:25 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19360 merged serhiy.storchaka, 2020-04-04 12:26
Messages (4)
msg365762 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-04-04 12:25
The proposed PR converts os.getgrouplist(), os.initgroups(), os.sendfile() and os.get_terminal_size() to Argument Clinic.
msg365763 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-04-04 12:44
The problems which prevented their conversions before (in issue20170):

1. os.sendfile() had parameter names conflicting with Python keywords. Was solved in issue38378.

2. os.get_terminal_size() has an optional argument without default value. It was solved in a way similar to issue37206.

3. Some functions have platform-specific types of arguments. os.sendfile() has additional parameters. It was solved by using a preprocessor. We need to repeat most of the declaration and docstring, but it is the best that we can have now.
msg366148 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-04-10 19:48
#37206 changed the signature "pop(self, key, default=None, /)" back to "D.pop(k[,d]) -> v", taken from dict.pop.__doc__.  However, the incorrect version that got reverted correctly added the positional-only indicator '/'.  Docstrings with signatures for such cases may need updating.

Unlike most objects with invalid signatures (as seen by inspect.signature), the current docstring for os.get_terminal_size does not have a backup signature for help (and IDLE) to present.  I cannot tell if the patch adds it.
msg366725 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-04-18 16:14
New changeset 2b5603140c09766a7d4e8243a70d7144f684f6f9 by Serhiy Storchaka in branch 'master':
bpo-40178: Convert the remaining os functions to Argument Clinic. (GH-19360)
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84359
2020-05-07 18:14:29serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-04-18 16:14:13serhiy.storchakasetmessages: + msg366725
2020-04-10 19:48:18terry.reedysetnosy: + terry.reedy
messages: + msg366148
2020-04-04 12:44:29serhiy.storchakasetnosy: + larry
components: + Argument Clinic
2020-04-04 12:44:19serhiy.storchakasetmessages: + msg365763
2020-04-04 12:26:36serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request18722
2020-04-04 12:25:08serhiy.storchakacreate