Commit Graph

9 Commits

Author SHA1 Message Date
Takeshi KOMIYA
94b31a2f07 Refactor test_util_inspect: Do not use unittest 2017-06-17 00:54:24 +09:00
Takeshi KOMIYA
5e65316459 Skip testcase for sphinx.util.inspect on 3.4.3
The inspect library of python-3.4.3 also can't handle wrapped
functions.
2017-05-09 23:24:25 +09:00
Takeshi KOMIYA
56d3458584 Fix flake8 violations 2017-05-09 21:57:36 +09:00
Takayuki SHIMIZUKAWA
6cb582fdd3 Merge pull request #3449 from njsmith/getargspec-__wrapped__
On py3, use inspect.signature for more accurate signature calculation
2017-04-19 21:21:19 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Nathaniel J. Smith
a3b80bc87a Make sure that getargspec raises on built-in types 2017-02-24 06:07:36 -08:00
Nathaniel J. Smith
b56d93158a On Py3, use inspect.signature for more accurate signature calculation
This improves handling of wrapped functions and bound methods.

It turns out that we no longer need to hack in support for
functools.partial; inspect.signature handles this automatically. Added
a test to make sure this didn't/doesn't regress.
2017-02-23 18:18:31 -08:00
Leo Huckvale
fa89582d57 Fix tests for Python 2.6 2016-07-14 16:41:33 +01:00
Leo Huckvale
670049c262 inspect: return defargs[0] if obj.__dict__ raises exception
The fallback implemented in #2731 cannot return `obj.__dict__[name]`
if the `__dict__` method has been redefined in such a way that it
raises an exception when trying to access it.

This commit adds a try-except block to work around this.
2016-07-14 14:13:06 +01:00