Skip to content

bpo-42260: Initialize warnings and time early at startup #23249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2020
Merged

bpo-42260: Initialize warnings and time early at startup #23249

merged 1 commit into from
Nov 12, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 12, 2020

  • 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.

https://bugs.python.org/issue42260

* 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.
@vstinner vstinner merged commit ef75a62 into python:master Nov 12, 2020
@vstinner vstinner deleted the init_core branch November 12, 2020 14:14
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants