[issue30113] Allow helper functions to wrap sys.setprofile

2017-05-12 Thread Louie Lu
Louie Lu added the comment: PR-1212 Add an explicit test for dispatch_return's assertion, could @benjaminp, @tiran or @giampaolo help to review this? Thanks! -- nosy: +benjamin.peterson, christian.heimes, giampaolo.rodola ___ Python tracker

[issue30113] Allow helper functions to wrap sys.setprofile

2017-04-22 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1368 ___ Python tracker ___ ___ Python-bugs-list

[issue30113] Allow helper functions to wrap sys.setprofile

2017-04-22 Thread Louie Lu
Louie Lu added the comment: Thanks, Nick. Your analysis is very helpful. After some testing, I found the problem here is because when we using `sys.setprofile` in the helper function, we didn't simulate the call (from where profiler create to helper function), that cause profile's frame link

[issue30113] Allow helper functions to wrap sys.setprofile

2017-04-21 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Louie. I've adjusted the issue title, as I think the core RFE is that we'd like the following helper function to work exactly the same way as calling sys.setprofile directly: def setprofile_helper(f): sys.setprofile(f) The following utility