Move exc state to generator. Fixes bpo-25612#1773
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
Sorry, something went wrong.
|
@markshannon, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @serhiy-storchaka and @Yhg1s to be potential reviewers. |
Sorry, something went wrong.
|
I've just linked by bpo user to my github user. Which should satisfy @the-knights-who-say-ni, hopefully. |
Sorry, something went wrong.
|
You might also want to check how this affects this strange behavior that @arigo found: https://bugs.python.org/issue28884#msg282532 |
Sorry, something went wrong.
1st1
left a comment
There was a problem hiding this comment.
I like this refactoring a lot. I'd go a step further and refactor tstate->*curexc_ too as well as add a couple of helper macros (not defined in limited API).
Sorry, something went wrong.
e0b55d4 to
e19057d
Compare
May 23, 2017 23:34
|
@njsmith It does indeed fix https://bugs.python.org/issue28884#msg282532. I've added it as a test case. |
Sorry, something went wrong.
|
Aside from a few code formatting nits the patch looks good. I just want to test it on my machine before giving it a green light; will do that tomorrow or the day after. |
Sorry, something went wrong.
0cc764b to
800150c
Compare
June 11, 2017 11:04
|
@pitrou Antoine, could you please take a look? I'm inclined to merge this. @markshannon Could you please rebase and add a NEWS entry? Would be cool if you could address the few review nits, but if you don't have time I can merge this as is and fix them myself. |
Sorry, something went wrong.
|
This looks good to me on the principle. It needs adressing @serhiy-storchaka 's comments, and also fixing the merge conflicts. |
Sorry, something went wrong.
|
@markshannon Mark, will you be able to work on this in the following couple of weeks? If not, I can help resolve code review comments. |
Sorry, something went wrong.
|
Not right now, but in the next week or so, yes. |
Sorry, something went wrong.
…erator/thread) object where it belongs.
800150c to
415121e
Compare
October 22, 2017 12:04
…t exception 'state' forms a stack.
7929841 to
e5ffc67
Compare
October 22, 2017 12:19
|
@markshannon, do you have push rights or would you like someone else to merge this PR? |
Sorry, something went wrong.
|
Is the problem I described on the tracker resolved? |
Sorry, something went wrong.
|
@serhiy-storchaka I've just fixed it. |
Sorry, something went wrong.
|
Thanks a lot, Mark, for looking into this. |
Sorry, something went wrong.
CPython change how the exception information is stored internally in 3.7a3. This simply adds fences based on python version around how to access the objects. Xref: python/cpython@ae3087c https://bugs.python.org/issue25612 python/cpython#1773
CPython change how the exception information is stored internally in 3.7a3. This simply adds fences based on python version around how to access the objects. Xref: python/cpython@ae3087c https://bugs.python.org/issue25612 python/cpython#1773
bpo-25612 (python#1773) moves the exception state information from frame object to coroutine (generator/thread) object where it belongs. As a consequence Stackless moves the exception state information for non-current tasklets from thread-state to the tasklet. This changes the pickle format of frame, tasklet and generator objects. The commit adds three test cases.
Moves the exception state from the frame to the coroutine. (Coroutine in the CS sense, which includes generators, coroutines and thread). This cleans up the code, removing about 60 lines, and fixes https://bugs.python.org/issue25612.
https://bugs.python.org/issue25612