[issue36204] Deprecate calling Py_Main() after Py_Initialize()? Add Py_InitializeFromArgv()?

STINNER Victor report at bugs.python.org
Mon May 27 11:28:13 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

I added Py_RunMain() in bpo-36763 which implements the PEP 587. IMHO it's the right solution for code like fontforge (see pseudo-code in my first message).

I'm no longer sure that we should deprecate calling Py_Main() after Py_Initialize(). Backward compatibility matters more here, no? Maybe the best we can do is to mention Py_RunMain() in Py_Main() documentation.

> PySys_SetArgvEx() can be called before Py_Initialize(), but arguments passed to this function are not parsed.

With the "Python Configuration" of PEP 587, PyConfig.argv is now parsed as Python command line arguments.

> INADA-san proposed to make the existing _Py_UnixMain() function public. (Currently, the function is private.)

The PEP 587 exposes this function with the name: Py_BytesMain().

--

I close the issue.

----------
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36204>
_______________________________________


More information about the Python-bugs-list mailing list