]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153467)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 10 Jul 2026 01:19:43 +0000 (03:19 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 01:19:43 +0000 (01:19 +0000)
commit53a24831cbc0f2a8f9aa42b8365a89ecf3186409
tree660600e98427adf1e19122b90072a29407c75fac
parent7a7da86d66e146b82eaac8ccc47584e3c1b38008
[3.14] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153467)

[3.15] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466)

* Check for signals more often. Previously, a pending exception could
  be removed by PyErr_Clear().
* Only call _PyInterpreterState_SetNotRunningMain() if
  _PyInterpreterState_SetRunningMain() has been called.
* Convert _PyPathConfig_UpdateGlobal() PyStatus error to an
  exception.
(cherry picked from commit cecafebc2e30ab2aac5f046ed5c9fbc75d6bfb51)

Co-authored-by: Victor Stinner <vstinner@python.org>
Modules/main.c