[issue46451] Tracing causes module globals to be mutated when calling functions from C

Sebastian Berg report at bugs.python.org
Tue Feb 1 10:21:01 EST 2022


Sebastian Berg <sebastian at sipsolutions.net> added the comment:

Thanks for having a look. I have confirmed this is related to Cython (no pandas/NumPy involved) – repro at https://github.com/seberg/bpo46451.  What happens under the hood in Cython is probably:
    https://github.com/cython/cython/blob/master/Cython/Utility/ObjectHandling.c#L2569-L2611

Which generates `PyEval_EvalCodeEx`, and I could not repro with just a `PyObject_FastCallDict`, so I assume Cython is doing something wrong and will open an issue there, but if you have a quick tip as to what might wrong, that could be nice :).

Otherwise, will just close this, and may reopen if Cython hits a wall.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46451>
_______________________________________


More information about the Python-bugs-list mailing list