pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://github.com/python/cpython/pull/108748

ss" /> gh-108634: PyInterpreterState_New() no longer calls Py_FatalError() by vstinner · Pull Request #108748 · python/cpython · GitHub
Skip to content

gh-108634: PyInterpreterState_New() no longer calls Py_FatalError()#108748

Merged
vstinner merged 1 commit intopython:mainfrom
vstinner:init_pystatus
Sep 1, 2023
Merged

gh-108634: PyInterpreterState_New() no longer calls Py_FatalError()#108748
vstinner merged 1 commit intopython:mainfrom
vstinner:init_pystatus

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Sep 1, 2023

PyInterpreterState_New() now raises a RuntimeError, instead of calling Py_FatalError() on error. And pycore_create_interpreter() now returns a status exception on error, rather than calling Py_FatalError().

  • Add _PyInterpreterState_New() function.
  • Replace Py_FatalError() with PyStatus in init_interpreter() and _PyObject_InitState().
  • _PyErr_SetFromPyStatus() now raises RuntimeError, instead of ValueError. It can now call PyErr_NoMemory() if it detects _PyStatus_NO_MEMORY().
  • init_runtime() cannot be called with _initialized=1: add an assertion in the caller instead.

pycore_create_interpreter() now returns a status exception on error,
rather than calling Py_FatalError().

* PyInterpreterState_New() now calls Py_ExitStatusException() instead
  of calling Py_FatalError() directly.
* Replace Py_FatalError() with PyStatus in init_interpreter() and
  _PyObject_InitState().
* _PyErr_SetFromPyStatus() now raises RuntimeError, instead of
  ValueError. It can now call PyErr_NoMemory() if it detects
  _PyStatus_NO_MEMORY().
* init_runtime() cannot be called with _initialized=1: add an
  assertion in the caller instead.
@vstinner vstinner merged commit b936cf4 into python:main Sep 1, 2023
@vstinner vstinner deleted the init_pystatus branch September 1, 2023 10:43
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.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy