cpython
cpython copied to clipboard
`PyEval_GetLocals()` leaks locals
Bug report
PyEval_GetLocals()
is documented as returning a borrowed reference. 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