Victor Stinner
Victor Stinner
> from .benchmarks import BENCHS Relative Python imports depends how you run you code. sys.argv[0] can be different than your command line. The Runner class has a program_args argument to...
How can we enhance the documentation to handle this issue?
> @haypo after using absolute imports inside the project, I still can do like this python -m formats That's why I consider that it's more a documentation issue than a...
> In sub interpreters atexit isn't even triggered (don't think that has changed in new Python versions) Py_EndInterpreter() calls atexit callbacks since Python 3.8. The atexit state is now per-interpreter...
In the logs, I see 3 Python threads: * Thread A calls threading._shutdown() * Thread B: ```` * Thread C: ```` It's strange to have two Python threads with no...
> To stop the threads you can try and use atexit atexit callbacks are called after threading._shutdown() in Py_Finalize() and Py_EndInterpreter().
I had a very interesting debug session with @frenzymadness who is able to reproduce the FreeIPA hang at exit in Apache mod_wsgi. I used gdb on Python 3.9. Random notes:...
I added debug traces in Python itself in functions like `Py_NewInterpreter()`, `Py_EndInterpreter()` and `new_threadstate()`. I modified Python to create tstate identifiers which are globally unique, to ease debugging, rather than...
> Py_EndInterpreter() is called on tstate 5 > Py_EndInterpreter() calls threading._shutdown() which hangs > tstate 3 still exists, it may explain the issue If I revert the threading._shutdown() change (https://github.com/python/cpython/commit/38c67738c64304928c68d5c2bd78bbb01d979b94),...
Logs with mod_wsgi debug traces: `WSGIVerboseDebugging On`. * Py_NewInterpreter() is called in Apache thread 1 with Python tstate 3 (0x7fb35c004840) * Py_EndInterpreter() is called in Apache thread 0 with Python...