]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42260: Initialize time and warnings earlier at startup (GH-23249)
authorVictor Stinner <vstinner@python.org>
Thu, 12 Nov 2020 14:14:13 +0000 (15:14 +0100)
committerGitHub <noreply@github.com>
Thu, 12 Nov 2020 14:14:13 +0000 (15:14 +0100)
commitef75a625cdf8377d687a04948b4db9bc1917bf19
treef9a979741790c9647b53e3f7c8f2c5fd66b6e56a
parentd19fa7a337d829e3dab3e9f919f5dcf09cf6f6ba
bpo-42260: Initialize time and warnings earlier at startup (GH-23249)

* Call _PyTime_Init() and _PyWarnings_InitState() earlier during the
  Python initialization.
* Inline _PyImportHooks_Init() into _PySys_InitCore().
* The _warnings initialization function no longer call
  _PyWarnings_InitState() to prevent resetting filters_version to 0.
* _PyWarnings_InitState() now returns an int and no longer clear the
  state in case of error (it's done anyway at Python exit).
* Rework init_importlib(), fix refleaks on errors.
Include/internal/pycore_interp.h
Include/internal/pycore_pylifecycle.h
Include/internal/pycore_warnings.h
Python/_warnings.c
Python/import.c
Python/pylifecycle.c
Python/sysmodule.c