forked from saghul/python-fibers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore compatibility with Python 3.11
* PyFrameObjects are now lazily allocated and no longer part of the PyThreadState. Therefore switch the _PyCFrame instead, but keep the PyFrameObject* for GC. python/cpython@ae0a2b7 * The recursion_depth is no longer stored directly in the PyThreadState and needs to be calculated from recursion_remaining and recursion_limit. python/cpython@b931077 * The exc_state was also simplified (no more exc_type and exc_traceback). python/cpython@396b583 * Finally the frame "data stack" needs to be saved and restored. How this was done in python-greenlet was used as a reference. python-greenlet/greenlet#280 * Add new test test_clean_callstack to check that the call stack from the creation of the Fiber doesn't leak into it (i.e. `tstate->cframe->current_frame = NULL;` in `stacklet__callback`; `tstate->frame = NULL;` in older Python versions).
- Loading branch information
Showing
4 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters