New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
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 <rep...@bugs.python.org> <https://bugs.python.org/issue41985> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com