]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153468)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 10 Jul 2026 01:01:57 +0000 (03:01 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 01:01:57 +0000 (03:01 +0200)
commit99c765a2801bfd2298b48610b117ed5af345c3ac
tree412235c8e2a60e9cb2ddbc35d520aa8ea4b081a2
parent3d9a42049e4fed0776829f4d7a7caead215634c8
[3.13] gh-152132: Fix bugs in Py_RunMain() (GH-153461) (GH-153466) (#153468)

[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