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.

Author vstinner
Recipients docs@python, vstinner
Date 2021-05-12.10:20:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
The https://docs.python.org/dev/c-api/init.html documentation lists many functions which is the legacy way to configure the Python initialization. These functions are kept for backward compatibility but have flaws and are less reliable than the new PyConfig API (PEP 587) documented at https://docs.python.org/dev/c-api/init_config.html

I propose to deprecate the legacy functions to configure the Python initialization. Examples:

* Py_SetPath()
* Py_SetProgramName()
* Py_SetPythonHome()
* Py_SetStandardStreamEncoding()
* PySys_AddWarnOption()
* PySys_AddWarnOptionUnicode()
* PySys_AddXOption()

I don't propose to schedule the removal of these functions, only mark them as deprecated in the *documentation*.

Related issue: bpo-43956 "C-API: Incorrect default value for Py_SetProgramName" and PR 24876.
History
Date User Action Args
2021-05-12 10:20:54vstinnersetrecipients: + vstinner, docs@python
2021-05-12 10:20:54vstinnersetmessageid: <[email protected]>
2021-05-12 10:20:54vstinnerlinkissue44113 messages
2021-05-12 10:20:53vstinnercreate