]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-96853: Restore test coverage for Py_Initialize(Ex) (GH-98212)
authorNick Coghlan <ncoghlan@gmail.com>
Sun, 30 Oct 2022 12:01:30 +0000 (22:01 +1000)
committerGitHub <noreply@github.com>
Sun, 30 Oct 2022 12:01:30 +0000 (22:01 +1000)
commit05e48865be69e1e5824f6915b588ff054717bb42
tree716ac0f9e038f575b4212db6d4a7b6a76b484d59
parent76f989dc3e668d15b3ec9a90bf6530276530acac
gh-96853: Restore test coverage for Py_Initialize(Ex) (GH-98212)

* As most of `test_embed` now uses `Py_InitializeFromConfig`, add
  a specific test case to cover `Py_Initialize` (and `Py_InitializeEx`)
* Rename `_testembed` init helper to clarify the API used
* Add a `PyConfig_Clear` call in `Py_InitializeEx` to make
  the code more obviously correct (it already didn't leak as
  none of the dynamically allocated config fields were being
  populated, but it's clearer if the wrappers follow the
  documented API usage guidelines)
Lib/test/test_embed.py
Misc/NEWS.d/next/C API/2022-10-16-15-00-25.gh-issue-96853.V0wiXP.rst [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2022-10-12-14-57-06.gh-issue-96853.ANe-bw.rst [new file with mode: 0644]
Programs/_testembed.c
Python/pylifecycle.c