bpo-33042: Fix pre-initialization sys module configuration by ncoghlan · Pull Request #6157 · python/cpython

@ncoghlan

- new embedding test case for bpo-33042
- also enhances existing embedding test cases
  to check for expected settings in the sys module
- adds checks for a valid thread state
- notes the intended handling of supplied values
- test case no longer segfaults, but fails due to
  the values not being added to the sys module

@ncoghlan

@ncoghlan

@ncoghlan

@ncoghlan

@ncoghlan ncoghlan changed the title [WIP] bpo-33042: Fix pre-initialization sys module configuration bpo-33042: Fix pre-initialization sys module configuration

Mar 25, 2018

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Mar 25, 2018
…6157)

- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
  called before Py_Initialize
- also enhanced the existing embedding test cases
  to check for expected settings in the sys module
(cherry picked from commit bc77eff)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>

miss-islington added a commit that referenced this pull request

Mar 25, 2018
- new test case for pre-initialization of sys.warnoptions and sys._xoptions
- restored ability to call these APIs prior to Py_Initialize
- updated the docs for the affected APIs to make it clear they can be
  called before Py_Initialize
- also enhanced the existing embedding test cases
  to check for expected settings in the sys module
(cherry picked from commit bc77eff)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>

@ncoghlan ncoghlan deleted the bpo-33042-restore-preinit-sys-options branch

March 30, 2018 07:43