Commit Graph

5 Commits

Author SHA1 Message Date
Victor Stinner 0cecc22842
bpo-20891: Remove test_capi.test_bpo20891() (#5425)
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.
2018-01-29 16:35:50 +01:00
Victor Stinner e10c9de9d7
bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655)
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)
2017-11-30 23:36:49 +01:00
Ned Deily 939231be0e Issue #27736: Improve the existing embedded interpreter init/fini test
by increasing the number of iterations.  That appears sufficient to
expose the ref count problem fixed in this issue.
Patch suggested by Xiang Zhang
2016-08-16 00:17:42 -04:00
Martin Panter 8f26565ba9 Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
Nick Coghlan 973fe0ba7a Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00