# Bug report `PyEval_GetLocals()` is documented as returning a [borrowed reference](https://docs.python.org/3/c-api/reflection.html#c.PyEval_GetLocals). It now returns a new reference, which causes callers to leak the local variables: https://github.com/python/cpython/blob/35c436186b849f8f2f9fb866c59015c9d034d448/Python/ceval.c#L2478-L2479 cc @gaogaotiantian @markshannon <!-- gh-linked-prs --> ### Linked PRs * gh-119769 * gh-119932 * gh-119934 * gh-121869 <!-- /gh-linked-prs -->