-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
"Monkey-patch inspect.isfunction()
to support Cython functions."
Introduced in 2018 (8.3.beta2) in #25373 (for #24994).
However, this change has been rejected by upstream (https://bugs.python.org/issue30071, https://www.python.org/dev/peps/pep-0575/, https://www.python.org/dev/peps/pep-0580/).
In this ticket:
-
we remove the monkey-patching
-
replace unnecessary uses of
inspect
in ordinary Sage library code by other solutions -
replace remaining uses of
inspect.isfunction
by the new name of our monkey-patched variant:sage.misc.sageinspect.is_function_or_cython_function
(To be checked whether https://www.python.org/dev/peps/pep-0590, superseding some of the above rejected PEPs, offers help; see also the informational PEP https://www.python.org/dev/peps/pep-0579/)
Related:
- Use Cython directive binding=True to get signatures for cython methods #26254 No signature shown in help for cythonized built-in methods
- Use sphinx.util.inspect.Signature not sphinx.ext.autodoc.inspector.formatargspec #27578 Use
sphinx.util.inspect.Signature
, notsphinx.ext.autodoc.inspector.formatargspec
- sage_getargspec mishandles keyword-only arguments #31309
sage_getargspec
mishandles keyword-only arguments
Depends on #31420
CC: @fchapoton @kwankyu @jhpalmieri @orlitzky
Component: refactoring
Author: Matthias Koeppe
Branch/Commit: 2ba4c43
Reviewer: Michael Orlitzky
Issue created by migration from https://trac.sagemath.org/ticket/32479