You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inspect.signature() doesn't parse __text_signature__ containing a newline character #85267
Activity
vstinner commentedon Jun 23, 2020
=> 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:
---
asottile commentedon Jun 24, 2020
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
the following code is hit because
ast.literal_eval(...)fails for the|d expression:cpython/Lib/inspect.py
Lines 2069 to 2070 in 2f9ada9
this causes the parameter to be skipped entirely
pythongh-85267: Improvements to inspect.signature __text_signature__ …
vstinner commentedon Nov 3, 2022
Sadly, I don't have the bandwidth to work on this issue, so I just close it.
JelleZijlstra commentedon Nov 8, 2022
Reopening as there's an active PR fixing this.
vstinner commentedon Nov 8, 2022
What is the active PR?
JelleZijlstra commentedon Nov 8, 2022
#98796
gh-85267: Improvements to inspect.signature __text_signature__ handli…
[3.11] pythongh-85267: Improvements to inspect.signature __text_signa…
[3.10] pythongh-85267: Improvements to inspect.signature __text_signa…
[3.11] gh-85267: Improvements to inspect.signature __text_signature__…
[3.10] gh-85267: Improvements to inspect.signature __text_signature__…
Merged main into regmachine branch (#50)