# Advice upgrading PEP 523 hobby project to 3.11

**URL:** <https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937>\
**Category:** Python Help\
**Tags:** help\
**Created:** [June 18, 2025, 3:01pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937 "2025-06-18T15:01:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jburgy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jburgy/32/28684_2.png) [@jburgy](https://discuss.python.org/u/jburgy)\
**Post date:** [June 18, 2025, 3:01pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937/1 "2025-06-18T15:01:46Z")

</div>

[skean](https://github.com/jburgy/skean) is a ~~project~~ hack which (ab)uses PEP 523 to make certain python function calls reactive (see README for an example). I am struggling to upgrade to 3.11 because of “[C API] Move PyFrameObject to the internal C API” (gh-90992). I agree with Mark Shannon’s [advice](https://discuss.python.org/t/no-obvious-way-of-getting-pyframeobject-inside-a-frame-evaluation-function-in-python-3-11/25966/2) that I “probably want to operate on the `_PyInterpreterFrame` struct, rather than the `PyFrameObject`.” Unfortunately, `skean.pyx` squirrels precious info in the `.f_trace` member of `PyFrameObject` to track callers.

What is this group’s advice to migrate these intrusive mutations given `_PyInterpreterFrame` is opaque?

---

<div class="post-metadata">

**Author:** ![MegaIng](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/megaing/32/16162_2.png) [@MegaIng](https://discuss.python.org/u/MegaIng)\
**Post date:** [June 18, 2025, 5:53pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937/2 "2025-06-18T17:53:09Z")

</div>

Genuine question: Why do you need any C API to implement something like this? Do you have a more complex example somewhere?

Or do you just want to do it with PEP 523 because you can?

---

<div class="post-metadata">

**Author:** ![jburgy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jburgy/32/28684_2.png) [@jburgy](https://discuss.python.org/u/jburgy)\
**Post date:** [June 18, 2025, 6:26pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937/3 "2025-06-18T18:26:37Z")

</div>

I don’t absolutely _need_ PEP 523 to do this. Case in point, [dag.py](https://github.com/jburgy/blog/blob/main/fun/dag.py) shows pure python approaches to achieve similar things.

The PEP 523/Cython version is faster and uses less memory.

---

<div class="post-metadata">

**Author:** ![jburgy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jburgy/32/28684_2.png) [@jburgy](https://discuss.python.org/u/jburgy)\
**Post date:** [October 24, 2025, 8:34pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937/4 "2025-10-24T20:34:51Z")

</div>

I have revisited this issue today, see my progress in [jburgy/skean#2](https://github.com/jburgy/skean/pull/2). As the PR explains, I am not at an impasse and looking for a way to access _current_ locals. Suggestions?

---

<div class="post-metadata">

**Author:** ![jburgy](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jburgy/32/28684_2.png) [@jburgy](https://discuss.python.org/u/jburgy)\
**Post date:** [October 25, 2025, 5:03pm UTC](https://discuss.python.org/t/advice-upgrading-pep-523-hobby-project-to-3-11/95937/5 "2025-10-25T17:03:17Z")

</div>

Ok, I broke some (all?) rules and found that `(<PyObject **>_frame) + 9` lets me access the current `_PyInterpreterFrame`’s `localplus`. No such thing as opacity in C!
