]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39796: Fix _warnings module initialization (GH-18739)
authorVictor Stinner <vstinner@python.org>
Mon, 2 Mar 2020 14:02:18 +0000 (15:02 +0100)
committerGitHub <noreply@github.com>
Mon, 2 Mar 2020 14:02:18 +0000 (15:02 +0100)
commit66b7973c1b2e6aa6a2462c6b13971a08cd665af2
tree29a6bfce69d2d244c2b307ab274e08a935be9fe5
parent4482337decdbd0c6e2150346a68b3616bda664aa
bpo-39796: Fix _warnings module initialization (GH-18739)

* Add _PyWarnings_InitState() which only initializes the _warnings
  module state (tstate->interp->warnings) without creating a module
  object
* Py_InitializeFromConfig() now calls _PyWarnings_InitState() instead
  of _PyWarnings_Init()
* Rename also private functions of _warnings.c to avoid confusion
  between the public C API and the private C API.
Include/internal/pycore_warnings.h
Python/_warnings.c
Python/pylifecycle.c