[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9975cc5008c795e069ce11e2dbed2110cc12e74e by Serhiy Storchaka in 
branch 'master':
bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for "fildes". 
(GH-22620)
https://github.com/python/cpython/commit/9975cc5008c795e069ce11e2dbed2110cc12e74e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +21600
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22620

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Local converters for file descriptors which uses PyObject_AsFileDescriptor() 
are defined and used in several files: Modules/fcntlmodule.c, 
Modules/posixmodule.c, Modules/selectmodule.c, Modules/termios.c.

The proposed PR replaces them all with a global private function 
_PyLong_FileDescriptor_Converter() and adds corresponding Argument Clinic 
converter "fildes".

In future it could be used in more places, allowing to pass a file with 
fileno() method to functions which accept file descriptor.

--
components: Argument Clinic
messages: 378338
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic: add converter for file descriptor
type: enhancement
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com