Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Improve frame and traceback pickling #107

Closed
@ghost

Description

Originally reported by: Anselm Kruis (Bitbucket: akruis, GitHub: akruis)


Issue #62 discusses problems caused by the non recursive pickling of frames. In the end I closed #62 as "won't fix", because the proposed solution (recursive frame pickling) had compatibility problems.

But there is still room for improvements:

  1. Linkage of frames in unpickled tracebacks. It is fairly simple to reconstruct the linkage for the inner frames - as returned by inspect.getinnerframes(tb) - of a traceback. I already coded a test case and a patch to static PyObject * tb_setstate(PyObject *self, PyObject *args) in prickelpit.c. This could go into 2.7-slp, because it shouldn't cause any compatibility problems.

  2. In issue pickling of frames without a tasklet #62 we discussed the idea of a FrameReducer, that would avoid the requirement to add a reduce function for frames to copy_reg. See https://bitbucket.org/stackless-dev/stackless/issues/62/pickling-of-frames-without-a-tasklet#comment-10422733. I'll try to implement this proposal. I'm undecided, if this is a feature for 2.7-slp, but if it works well, it should definitely go into 3.4-slp. And it will help to fix 3.5-slp.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions