Larry Hastings added the comment: Okay, one more diff. I have high hopes for this, but then I had high hopes yesterday.
Nick, could you review the PyTypeObject changes in this patch? Obviously I'd love a review of the whole thing, but if you can only make a little time, the crucial part is the "delta from patch set" 5 for typeobject.c. First thing: I must never have run the unit test suite before cutting the diff yesterday, because I did today and there were a bunch of problems. That's clowny and I apologize. But it's fixed now, and I assure you, there's no way I would have actually checked this in without running the test suite immediately before. Here's what changed today: Core: * Modified typeobject.c so that when creating an object, if it copies the type's "__doc__", it skips past the signature, because type objects are callable and have signatures now. * Default value for dict.fromkeys parameter is now None. (Previously it was NULL, which was simply wrong.) Lib and tests: * pydoc now catches both ValueError and TypeError when it tries inspect.signature. * Added a fix for unittest.mock courtesy of Michael Foord. It previously assumed that anything it could get an inspect.Signature for was written in Python. Now that that's no longer true, it broke some other code. Michael's pretty confident that's the right fix, and in any case it makes the tests pass again. * Bashed up some IDLE unit tests that depend on docstrings. These are accurate for now, but look wrong because of the __text_signature__ grabbing the first line when it shouldn't. When I get to put in the new signature syntax, these will break again and I'll put them back. * General unit test fixes, to live in this modern world. Tools: * Argument Clinic now makes sure that parser functions for __new__ are always of type newfunc, the type of the tp_new slot. Similarly, parser functions for __init__ are now always of type initproc, the type of tp_init. ---------- Added file: http://bugs.python.org/file33683/larry.support.text_signature.on.more.types.7.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20189> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com