]> granicus.if.org Git - python/commit
bpo-33042: Fix pre-initialization sys module configuration (GH-6157)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 25 Mar 2018 11:27:57 +0000 (04:27 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Mar 2018 11:27:57 +0000 (04:27 -0700)
commitc6d94c37f4fd863c73fbfbcc918fd23b458b5301
treee48ef7d601507a2f329344462116ace45245c5cb
parent291d5f3e7195659f874fe56b0e3ed717b57597ee
bpo-33042: Fix pre-initialization sys module configuration (GH-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 bc77eff8b96be4f035e665ab35c1d06e22f46491)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
Doc/c-api/init.rst
Doc/c-api/sys.rst
Doc/whatsnew/3.7.rst
Lib/test/test_embed.py
Misc/NEWS.d/next/C API/2018-03-20-21-43-09.bpo-33042.FPFp64.rst [new file with mode: 0644]
Programs/_testembed.c
Python/sysmodule.c