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.
Created on 2020年06月23日 22:26 by vstinner, last changed 2022年04月11日 14:59 by admin.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 21066 | Anthony Sottile, 2020年06月23日 22:27 | ||
| Messages (2) | |||
|---|---|---|---|
| msg372213 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2020年06月23日 22:26 | |
$ ./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 select.epoll.register = register(self, /, fd) Registers a new fd or raises an OSError if the fd is already registered. (...) --- |
|||
| msg372222 - (view) | Author: Anthony Sottile (Anthony Sottile) * | Date: 2020年06月24日 01:12 | |
Looking into this, it appears to be due to the default value and not due to the newline I've stumbled upon two simplifications to the routines in inspect but not a fix for this 1. https://github.com/python/cpython/pull/21100 2. https://github.com/python/cpython/pull/21104 the following code is hit because `ast.literal_eval(...)` fails for the `|`d expression: https://github.com/python/cpython/blob/2f9ada96e0d420fed0d09a032b37197f08ef167a/Lib/inspect.py#L2069-L2070 this causes the parameter to be skipped entirely |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:32 | admin | set | github: 85267 |
| 2020年06月24日 01:12:14 | Anthony Sottile | set | messages: + msg372222 |
| 2020年06月23日 22:27:45 | Anthony Sottile | set | keywords:
+ patch nosy: + Anthony Sottile pull_requests: + pull_request20269 stage: patch review |
| 2020年06月23日 22:26:29 | vstinner | create | |