Message209871
Yury: In revision 9433b380ad33 you changed inspect.Signature so that it cannot handle builtin classes. Please fix it.
>>> import _pickle
>>> import inspect
>>> str(inspect.signature(_pickle.Pickler))
'()'
>>> _pickle.Pickler.__text_signature__
'(file, protocol=None, fix_imports=True)'
Those two strings should be the same.
I don't know any guaranteed way to tell a builtin class from a
user class. So if you pass in a class, the best approach is to
do what it used to do: try from_builtin, and if it fails fail over
to the isinstance(obj, type) code. You changed it to
if _signature_is_builtin(obj):
return Signature.from_builtin(obj)
This unambiguously returns the result from from_builtin. Either
find a way that you can determine a class is a builtin 100%
reliably, or change this to *try* from_builtin but only return its
result if it's successful.
Your changes might have also caused #20471; that wasn't failing before. I'm still investigating. |
|
Date |
User |
Action |
Args |
2014-02-01 03:42:17 | larry | set | recipients:
+ larry, yselivanov |
2014-02-01 03:42:17 | larry | set | messageid: <1391226137.37.0.568949403046.issue20473@psf.upfronthosting.co.za> |
2014-02-01 03:42:17 | larry | link | issue20473 messages |
2014-02-01 03:42:16 | larry | create | |
|