[issue40910] Py_GetArgcArgv() is no longer exported by the C API

STINNER Victor report at bugs.python.org
Mon Jun 8 10:08:56 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

See also bpo-5672 "Implement a way to change the python process name", especially this comment:
https://bugs.python.org/issue5672#msg108524

"""
setproctitle is quite stable, my company uses it in production environment very heavily with python 2.x. Probably its users base is not huge, but that's because it's a relatively specialized tool.

Python3 porting is not straightforward because python2 exports the original argv pointer using Py_GetArgcArgv() whereas python3 only exports a decoded version in a wchar_t* array. This may not be a showstopper: probably the original argv can still be found scanning backwards from environ: I want to test it but I haven't had requests for it yet, so it wasn't a top priority.

So, while I'd be pleased to have it included in the stdlib, I'm not really convinced it would be useful to such a large audience. Anyway I'm available for any improvement it would make the tool more useful and to anybody eager to push for its inclusion.
"""

----------

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


More information about the Python-bugs-list mailing list