GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — bpo-43956: Doc/c-api: Fix default program name by joukewitteveen · Pull Request #24876 · python/cpython Conversation
|
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Additionally, the documentation currently says:
The code, however, duplicates the string, so I am not sure this is true. Because the duplication might be an implementation detail that is intentionally left open to change, I did not remove this sentence. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
@vstinner do you have an opinion on this? Looks like this part of your commit made it so that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I suggest to link to https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.program_name which documents the default value.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Good point. I extended the text with a bit more detail. This includes removing the 'static lifetime' remark. Please let me know if that should be reinstated.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I already reviewed the PR. IMO it's a bad idea to document the default program in Py_SetProgramName(). It should link to https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.program_name which is the reference. Py_SetProgramName() is a legacy API and should be avoided. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I created bpo-44113: "[C API] Deprecate legacy API for configure Python initialization". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
But I had updated it since, in response to your comments.
I updated the PR to only document the specifics of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The full program name inference is done in Python/initconfig.c and the reference documentation is with PyConfig.program_name.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.