My first fix is not enough to make test_bpo20891() reliable. A second
fix is needed and it was decided to not backport it, so remove the
test instead.
For Python 3.6, the workaround is to call PyEval_InitThreads() before
spawning the first C thread.
Python 3.7 will have both fixes.
When PyGILState_Ensure() is called in a non-Python thread before
PyEval_InitThreads(), only call PyEval_InitThreads() after calling
PyThreadState_New() to fix a crash.
Add an unit test in test_embed.
Enhance also embedded tests, backport from master:
* Add test_pre_initialization_api()
* Set PYTHONIOENCODING environment variable in
test_forced_io_encoding()
(cherry picked from commit b4d1e1f7c1)
bootstrap files:
Could not find platform dependent libraries <exec_prefix
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Patch by Xiang Zhang
Issue #26516:
* Add PYTHONMALLOC environment variable to set the Python memory
allocators and/or install debug hooks.
* PyMem_SetupDebugHooks() can now also be used on Python compiled in release
mode.
* The PYTHONMALLOCSTATS environment variable can now also be used on Python
compiled in release mode. It now has no effect if set to an empty string.
* In debug mode, debug hooks are now also installed on Python memory allocators
when Python is configured without pymalloc.