Author miyakogi
Recipients gvanrossum, michael.foord, miyakogi, vstinner, yselivanov
Date 2016-01-20.03:46:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thank you for reviewing patch.

I wrote test and updated patch. To pass the test, both this patch and issue25599's patch are required.

Changes of the patch:
- copy __code__ not only functions but also methods
- add autospec (create_autospec) suppoort

I have completely missed about autospec, thank you for a mention about it.
For autospec, simply copying original __code__ to funcopy makes error on existing tests.
That's why I changed the src of exec, but it seems to be quite ad-hoc. It may be better to be improved, but I don't have any good idea, sorry.

On the tests of this patch, I wonder if it's better to use assertIs(.., True/False) instead of assertTrue/False, since it was one of the problem in issue25599.
To apply this change and pass test, need to change asyncio.iscoroutinefunction to return bool. The change would be very easy, just update issue25599's patch like `return_value = bool(getattr(func, ...`.
Date User Action Args
2016-01-20 03:46:14miyakogisetrecipients: + miyakogi, gvanrossum, vstinner, michael.foord, yselivanov
2016-01-20 03:46:14miyakogisetmessageid: <>
2016-01-20 03:46:14miyakogilinkissue26140 messages
2016-01-20 03:46:14miyakogicreate