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