This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: C-API: Incorrect default value for Py_SetProgramName
Type: Stage:
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, joukewitteveen, vstinner
Priority: normal Keywords:

Created on 2021-04-27 17:57 by joukewitteveen, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 24876 open joukewitteveen, 2021-04-27 17:57
Messages (3)
msg392113 - (view) Author: Jouke Witteveen (joukewitteveen) * Date: 2021-04-27 17:57
The default program name is hardcoded in Python/initconfig.c:config_init_program_name. It is "python" on Windows, and "python3" elsewhere. The documentation currently suggests that it is "python" everywhere.

Additionally, the documentation currently says:

> The argument should point to a zero-terminated wide character string in static storage whose contents will not change for the duration of the program’s execution.

The code, however, duplicates the string, so I am not sure this is true.
msg393504 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-12 10:29
I created bpo-44113: "[C API] Deprecate legacy API for configure Python initialization".
msg394123 - (view) Author: Jouke Witteveen (joukewitteveen) * Date: 2021-05-21 15:51
It is unclear to me what is holding back the proposed pull request. Is it simply waiting for someone from docs@python to take a look, or did it fall off the radar of vstinner in his related activities to deprecate the legacy API?
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88122
2021-05-21 15:51:45joukewitteveensetmessages: + msg394123
2021-05-12 10:29:01vstinnersetnosy: + vstinner
messages: + msg393504
2021-04-27 17:57:00joukewitteveencreate