Victor Stinner
fac72f1ee9
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.
2026-07-09 18:28:15 +00:00
..
2026-06-12 14:03:21 +03:00
2026-07-03 13:34:15 +03:00
2026-05-15 14:42:30 +02:00
2026-07-05 21:17:20 -04:00
2026-05-24 16:16:12 +03:00
2026-07-09 13:59:28 +00:00
2026-06-04 16:41:47 +03:00
2026-07-06 05:22:37 +00:00
2026-07-06 17:32:36 +01:00
2026-07-09 18:28:15 +00:00
2026-07-06 12:56:32 -07:00
2026-06-17 15:27:02 +02:00
2026-04-09 08:52:30 +01:00
2026-05-24 15:03:22 +03:00
2026-05-24 16:16:12 +03:00
2026-07-09 20:01:32 +03:00
2026-05-14 01:21:03 +02:00
2026-05-24 16:16:12 +03:00
2026-06-27 12:46:50 +05:30
2026-05-24 16:16:12 +03:00
2026-06-07 08:19:05 -07:00
2026-07-09 20:01:32 +03:00
2026-07-03 20:43:24 +03:00
2026-04-11 15:18:02 -07:00
2026-06-27 10:10:11 +03:00
2026-07-04 12:21:16 +02:00
2026-07-01 11:54:02 +02:00
2026-05-24 16:16:12 +03:00
2026-05-27 13:23:28 +03:00
2026-06-02 21:13:34 +01:00
2026-05-24 16:16:12 +03:00
2026-05-24 16:16:12 +03:00
2026-05-24 16:16:12 +03:00
2026-07-09 19:08:29 +03:00
2026-06-25 07:04:02 +00:00
2025-05-22 06:50:06 -06:00
2026-06-25 12:02:00 +03:00
2026-06-26 14:47:22 +01:00
2026-07-09 17:36:08 +00:00
2026-07-07 00:36:26 +01:00
2026-05-28 08:05:03 -07:00
2024-08-17 13:48:16 +05:30
2026-05-24 16:16:12 +03:00
2026-04-02 23:20:13 +02:00
2026-06-18 09:08:00 +09:00
2026-06-13 10:23:44 -07:00
2026-06-02 21:13:34 +01:00
2026-05-18 18:39:54 +03:00
2026-05-03 20:20:51 +00:00
2026-04-15 15:59:02 +02:00
2025-04-25 10:26:58 +02:00
2024-11-28 13:29:27 +01:00
2025-04-25 10:26:58 +02:00
2026-07-06 17:32:36 +01:00
2025-06-27 15:15:11 +00:00
2026-06-30 11:57:22 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-26 15:26:34 +01:00
2026-06-25 13:11:17 +00:00
2026-03-17 12:16:35 +02:00
2026-07-01 15:15:33 +01:00
2026-06-09 11:11:17 +00:00
2026-05-24 16:16:12 +03:00
2026-04-08 09:15:11 +02:00
2026-07-08 09:41:38 +00:00
2026-06-29 08:42:56 +00:00
2026-05-24 16:16:12 +03:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2025-05-26 10:56:31 +02:00
2026-03-24 17:47:55 +00:00
2026-06-25 12:02:53 +00:00
2026-06-30 10:27:30 +02:00
2025-03-18 11:26:51 +01:00
2026-07-08 12:27:32 +00:00
2026-03-24 17:47:55 +00:00
2026-05-12 22:46:46 +03:00
2026-07-04 12:09:42 +02:00
2026-05-24 16:16:12 +03:00
2025-04-09 16:18:54 -07:00
2024-12-03 12:45:50 +00:00
2026-07-01 19:50:07 +01:00
2026-03-24 17:47:55 +00:00
2025-08-07 16:32:17 -07:00
2026-07-03 19:07:29 -07:00
2025-03-18 14:31:13 +01:00
2025-03-03 14:59:46 +01:00
2025-03-11 13:06:36 +01:00
2026-07-07 18:28:05 +02:00
2026-06-17 00:16:06 +01:00
2026-03-24 17:47:55 +00:00
2025-08-01 10:45:40 -07:00
2026-05-24 16:16:12 +03:00
2026-06-02 21:13:34 +01:00
2026-07-09 18:28:15 +00:00
2025-09-18 09:25:01 +00:00
2026-07-06 21:10:23 +03:00
2026-06-06 10:19:45 +00:00
2026-03-24 17:47:55 +00:00
2026-06-30 22:49:01 +02:00
2026-05-24 16:16:12 +03:00
2026-07-03 16:30:02 +01:00
2026-03-24 17:47:55 +00:00
2026-06-24 15:10:46 +01:00
2026-07-08 16:45:15 +00:00
2026-03-24 17:47:55 +00:00
2026-05-24 16:16:12 +03:00
2026-05-13 18:35:50 +02:00
2025-07-21 13:47:26 -04:00
2026-06-09 11:11:17 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-05-24 16:16:12 +03:00
2026-06-27 18:00:34 +03:00
2025-09-17 17:18:04 +00:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-05-24 16:16:12 +03:00
2026-05-26 01:37:14 +01:00
2026-06-19 14:23:01 +00:00
2026-06-19 14:23:01 +00:00
2026-06-06 11:34:33 +03:00
2026-06-15 16:36:50 +02:00
2026-02-18 12:58:21 +02:00
2026-05-13 18:35:50 +02:00
2026-05-13 18:35:50 +02:00
2026-05-13 18:35:50 +02:00
2026-03-24 17:47:55 +00:00
2026-03-24 17:47:55 +00:00
2026-05-24 16:16:12 +03:00