Issue 41095: inspect.signature() doesn't parse text_signature containing a newline character (original) (raw)
$ ./python Python 3.10.0a0 (heads/unicode_latin1:40855c7064, Jun 24 2020, 00:20:07)
import select select.epoll.register.text_signature '($self, /, fd,\n eventmask=select.EPOLLIN | select.EPOLLPRI | select.EPOLLOUT)'
import inspect inspect.signature(select.epoll.register) <Signature (self, /, fd)>
=> eventmask parameter is gone!
Either signature() must raise an exception, or it must handle a text_signature containing a newline character.
Issue spotted on bpo-31938 when fixing "./python -m pydoc select".
By the way, as expected, pydoc shows:
Help on method_descriptor in select.epoll:
$ ./python -m pydoc select.epoll.register