[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Yury Selivanov added the comment: Closing this issue. See #17481 for details. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Yury Selivanov added the comment: This is related to issue #17481 -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Berker Peksag added the comment: This looks like a duplicate of issue 1748064. -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Jesús Cea Avión added the comment: David, please subscribe to Issue #16612. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
David Villa Alises added the comment: What about something like gobject.introspection? https://live.gnome.org/GObjectIntrospection/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Larry Hastings added the comment: http://mail.python.org/pipermail/python-dev/2012-December/122920.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Jesús Cea Avión added the comment: Larry, Ping... :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Changes by David Villa Alises david.vi...@gmail.com: -- nosy: +David.Villa.Alises ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Brett Cannon added the comment: So at this point you should use inspect.signature(), not getfullargspec(). With that you could do this if you either allowed setting the __signature__ attribute and then provided code that would set it, made __signature__ a property that returned the Signature object if desired on a built-in, or come up with some automated way to take the argument string from PyArg_Parse() as you suggested. -- nosy: +brett.cannon, larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Changes by Larry Hastings la...@hastings.org: -- assignee: - larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Larry Hastings added the comment: I'm working on a solution for this--expect an announcement on c.l.p-d in, oh, a week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work with builtins
New submission from Jesús Cea Avión: Yesterday I was attending a conference about a MOCK like library and the speaker told us about some inspect functionalities not working correctly with builtins. For instance: Python 3.3.0 (default, Oct 2 2012, 02:07:16) [GCC 4.4.3] on linux Type help, copyright, credits or license for more information. import inspect def f(a=None) : ... pass ... inspect.getcallargs(f) {'a': None} inspect.getargspec(f) ArgSpec(args=['a'], varargs=None, keywords=None, defaults=(None,)) inspect.getcallargs(list) Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/inspect.py, line 993, in getcallargs spec = getfullargspec(func) File /usr/local/lib/python3.3/inspect.py, line 850, in getfullargspec raise TypeError('{!r} is not a Python function'.format(func)) TypeError: class 'list' is not a Python function inspect.getargspec(list) Traceback (most recent call last): File stdin, line 1, in module File /usr/local/lib/python3.3/inspect.py, line 823, in getargspec getfullargspec(func) File /usr/local/lib/python3.3/inspect.py, line 850, in getfullargspec raise TypeError('{!r} is not a Python function'.format(func)) TypeError: class 'list' is not a Python function Can we annotate builtins to support this?. What about types defined in CModules? -- messages: 175725 nosy: jcea priority: normal severity: normal status: open title: inspect.getargspec() and inspect.getcallargs() don't work with builtins versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Changes by Jesús Cea Avión j...@jcea.es: -- title: inspect.getargspec() and inspect.getcallargs() don't work with builtins - inspect.getargspec() and inspect.getcallargs() don't work for builtins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Changes by Jesús Cea Avión j...@jcea.es: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16490] inspect.getargspec() and inspect.getcallargs() don't work for builtins
Jesús Cea Avión added the comment: I am fully aware that the interpreter doesn't know how a method/function written in C is going to parse the parameter list/keywords. And that even if we solve this (for instance, with annotations that create wrappers calling PyArg_Parse() automatically), every C extension out there would need to support it too. Just brainstorming. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com