Victor Stinner
3d9a42049e
[3.13] gh-152132: Fix Py_RunMain() to return an exit code ( #153446 ) ( #153455 ) ( #153458 )
...
[3.14] gh-152132: Fix Py_RunMain() to return an exit code (#153446 ) (#153455 )
gh-152132: Fix Py_RunMain() to return an exit code (#153446 )
* Fix Py_RunMain() to return an exit code, rather than calling
Py_Exit(), when running a script, a command, or the REPL.
* _PyRun_SimpleFile() now logs errors to stderr, for example if setting
__main__.__file__ fails.
* Add tests on Py_RunMain() exitcode.
* Rename functions:
* _PyRun_SimpleStringFlagsWithName() => _PyRun_SimpleString()
* _PyRun_SimpleFileObject() => _PyRun_SimpleFile()
* _PyRun_AnyFileObject() => _PyRun_AnyFile()
* _PyRun_InteractiveLoopObject() => _PyRun_InteractiveLoop()
* Change _PyRun_SimpleString(), _PyRun_SimpleFile(), _PyRun_AnyFile() and
_PyRun_InteractiveLoop() return type to PyObject*.
* pymain_repl() now displays the error if PySys_Audit() or
import _pyrepl failed.
* PyRun_SimpleFileExFlags() and PyRun_AnyFileExFlags() now log
PyUnicode_DecodeFSDefault() error. So these functions can no longer
return -1 with an exception set.
(cherry picked from commit fac72f1ee9 )
(cherry picked from commit 62c34a62c2 )
2026-07-09 22:50:58 +02:00
..
2025-08-04 06:41:47 +08:00
2023-08-26 04:05:17 +02:00
2022-06-20 16:04:52 +02:00
2024-05-03 06:17:32 -07:00
2024-05-03 06:17:32 -07:00
2024-12-11 13:40:45 +00:00
2026-03-24 02:47:53 +01:00
2023-08-21 18:05:59 +00:00
2023-08-21 19:15:52 +02:00
2024-02-09 17:08:32 -05:00
2024-04-12 07:40:55 +00:00
2025-05-20 14:46:57 +02:00
2023-11-15 16:38:31 +00:00
2023-08-29 01:20:02 +00:00
2024-03-29 13:35:43 -04:00
2025-12-28 14:32:16 +00:00
2025-12-28 14:32:16 +00:00
2026-03-24 02:47:53 +01:00
2024-05-02 18:25:36 -04:00
2024-04-04 15:47:26 +00:00
2023-11-15 16:38:31 +00:00
2025-03-11 11:56:54 +00:00
2024-07-15 16:53:52 -04:00
2024-06-21 20:20:41 +00:00
2024-04-11 23:23:25 +00:00
2023-07-22 20:57:59 +00:00
2024-02-02 12:14:34 +00:00
2024-08-02 13:58:24 +00:00
2024-06-30 10:04:39 +00:00
2023-09-08 17:54:45 +01:00
2023-09-15 15:04:21 -07:00
2025-02-06 13:27:30 -05:00
2023-08-21 18:05:59 +00:00
2023-08-21 19:15:52 +02:00
2024-04-30 22:32:55 +02:00
2024-02-29 08:11:28 -08:00
2024-04-04 15:47:26 +00:00
2023-05-07 10:11:42 +05:30
2025-11-05 18:39:28 +01:00
2024-02-17 10:03:10 +09:00
2024-05-03 16:21:04 -04:00
2024-09-30 21:27:29 +00:00
2024-02-29 08:11:28 -08:00
2019-05-17 03:15:12 +02:00
2024-05-06 23:07:23 -04:00
2024-10-24 13:59:23 -04:00
2024-10-24 13:59:23 -04:00
2024-10-24 13:59:23 -04:00
2022-11-16 09:54:28 -07:00
2023-08-24 16:06:53 +00:00
2023-11-15 16:38:31 +00:00
2024-11-12 22:00:42 +00:00
2024-12-03 16:46:30 +00:00
2024-03-11 11:02:58 -04:00
2024-04-24 09:46:17 +00:00
2024-05-04 08:23:50 +00:00
2025-10-09 11:42:47 -04:00
2024-05-03 06:17:32 -07:00
2024-02-20 09:39:55 +00:00
2024-05-02 13:03:05 -07:00
2024-01-23 11:08:23 -07:00
2025-07-28 12:19:32 +00:00
2026-03-31 17:06:38 +02:00
2023-08-24 19:07:54 +02:00
2024-08-16 01:49:17 -07:00
2024-07-03 18:29:00 +00:00
2024-10-24 19:37:31 +00:00
2023-07-25 03:16:28 +00:00
2024-01-21 01:14:45 +09:00
2024-10-24 14:08:15 +00:00
2024-02-14 00:32:51 +00:00
2026-07-08 13:12:43 +00:00
2024-01-26 19:38:14 -08:00
2024-01-26 19:38:14 -08:00
2026-03-03 04:09:02 +08:00
2023-11-02 10:18:43 +00:00
2024-06-26 15:35:19 +02:00
2024-02-20 16:50:43 +00:00
2024-08-07 18:29:03 +05:30
2023-08-24 17:28:35 +02:00
2023-08-24 17:47:44 +00:00
2025-02-12 10:43:25 -05:00
2024-04-24 16:18:24 +00:00
2024-12-17 11:45:29 +00:00
2026-06-09 14:45:59 +00:00
2026-07-09 22:50:58 +02:00
2025-12-09 14:13:35 +00:00
2024-02-20 13:04:37 -05:00
2025-11-27 17:55:31 +01:00
2024-06-26 15:32:00 -06:00
2023-09-06 15:54:59 +00:00
2026-07-09 22:50:58 +02:00
2025-08-17 09:08:14 -07:00
2025-07-30 11:06:44 -07:00
2022-11-30 23:04:30 +02:00
2024-10-24 13:59:23 -04:00
2024-09-30 21:27:29 +00:00
2025-06-04 17:10:35 +02:00
2025-03-11 11:56:54 +00:00
2024-05-06 20:12:39 -04:00
2023-10-10 08:26:29 +09:00
2024-02-29 08:11:28 -08:00
2024-05-04 15:45:49 +00:00
2023-08-21 18:12:22 +00:00
2023-07-25 03:16:28 +00:00
2024-06-17 08:01:49 -07:00
2025-02-25 22:50:26 +00:00
2024-07-19 09:13:08 +00:00
2023-08-24 17:40:56 +02:00
2023-10-12 14:52:14 +00:00
2025-01-18 23:39:07 +00:00
2024-07-18 01:52:39 -07:00
2024-03-08 00:21:21 +08:00
2025-02-18 13:18:37 +02:00
2024-05-10 16:36:33 +00:00
2023-11-30 11:12:49 +01:00
2024-10-24 13:59:23 -04:00
2025-05-20 14:46:57 +02:00
2024-02-28 09:56:40 +00:00
2025-08-22 20:25:24 +08:00
2025-08-22 20:25:24 +08:00
2024-06-20 16:00:25 +00:00
2025-07-01 11:26:52 +02:00