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

2022-02-01 Thread Sebastian Berg
Sebastian Berg added the comment: While I have a repro for Python, I think the pre release of cython already fixes it (and I just did not regenerated the C sources when trying, I guess. A `git clean` to the rescue...). -- ___ Python tracker

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

2022-02-01 Thread Sebastian Berg
Sebastian Berg added the comment: Not reopening for now, but I will note again that (AFAIK) Cython uses `PyEval_EvalCodeEx`, and the docs say that it is not used internally to CPython anymore. So it seems pretty plausible that the bug is in `PyEval_EvalCodeEx` and not the generated Cython c

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

2022-02-01 Thread Sebastian Berg
Change by Sebastian Berg : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

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

2022-02-01 Thread Sebastian Berg
Sebastian Berg 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/

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

2022-02-01 Thread Mark Shannon
Mark Shannon added the comment: Can you reproduce this in pure Python? If not, can you produce a minimal reproducer using just NumPy? If you can't do either, I'm going to have to assume that this is a NumPy or Pandas bug. Maybe NumPy or Pandas is accessing CPython internals, but not via the

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

2022-01-31 Thread Sebastian Berg
Change by Sebastian Berg : -- title: Possibly bad interaction with tracing and cython? -> Tracing causes module globals to be mutated when calling functions from C ___ Python tracker