Issue36940
Created on 2019-05-16 15:26 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg342653 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-05-16 15:26 | |
Python/frozenmain.c should use pre-initialization and be adapted for _PyCoreConfig. Py_FrozenMain() reimplements some features which are now implemented by _Py_InitializeFromConfig(): * disable C streams (stdin, stdout, stderr) buffering * decode argv using Py_DecodeLocale() * set the program name (call Py_SetProgramName()) * set sys.argv * reimplement the REPL It seems like it could use _Py_RunMain(), but I'm not sure. |
|||
| msg343446 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-05-25 00:41 | |
Another file which should maybe also be updated to PEP 587, PC/bdist_wininst/install.c: static int compile_filelist(HINSTANCE hPython, BOOL optimize_flag) { DECLPROC(hPython, void, Py_Initialize, (void)); DECLPROC(hPython, void, Py_SetProgramName, (wchar_t *)); DECLPROC(hPython, void, Py_Finalize, (void)); DECLPROC(hPython, int, PyRun_SimpleString, (char *)); DECLPROC(hPython, PyObject *, PySys_GetObject, (char *)); DECLVAR(hPython, int, Py_OptimizeFlag); int errors = 0; struct tagFile *p = file_list; if (!p) return 0; if (!Py_Initialize || !Py_SetProgramName || !Py_Finalize) return -1; if (!PyRun_SimpleString || !PySys_GetObject || !Py_OptimizeFlag) return -1; *Py_OptimizeFlag = optimize_flag ? 1 : 0; Py_SetProgramName(wmodulename); Py_Initialize(); errors += do_compile_files(PyRun_SimpleString, optimize_flag); Py_Finalize(); return errors; } |
|||
| msg394482 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2021-05-26 22:38 | |
Fixed by bpo-44131. |
|||
| msg394484 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2021-05-26 22:39 | |
> Another file which should maybe also be updated to PEP 587, PC/bdist_wininst/install.c PC/bdist_wininst/ has been removed in the meanwhile. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:15 | admin | set | github: 81121 |
| 2021-05-26 22:39:29 | vstinner | set | messages: + msg394484 |
| 2021-05-26 22:38:11 | vstinner | set | status: open -> closed superseder: [C API] Add tests on Py_FrozenMain() messages: + msg394482 resolution: duplicate |
| 2019-05-25 00:41:10 | vstinner | set | messages: + msg343446 |
| 2019-05-16 15:26:17 | vstinner | create | |
