Issue 40520: Remove redundant comment in pydebug.h - Python tracker

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
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, miss-islington, ncoghlan, shihai1991, vstinner
Priority: normal Keywords: patch

Created on 2020-05-05 14:45 by shihai1991, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19930 closed shihai1991, 2020-05-05 14:48
PR 19931 merged shihai1991, 2020-05-05 15:00
Messages (6)
msg368158 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-05-05 14:45
Nick left a comment in `pydebug.h`
/* These global variable are defined in pylifecycle.c */
/* XXX (ncoghlan): move these declarations to pylifecycle.h? */

I have checked those global variables are not only debug variables and they are defined in `Python/initconfig.c` now.
If I understand clearly, those declarations should moved to `Include/cpython/initconfig.h` and `pydebug.h` could be deleted.

ref: https://github.com/python/cpython/commit/d600951748d7a19cdb3e58a376c51ed804b630e6
msg368160 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-05 14:49
Global configuration variables are part of the C API. They are now documented:
https://docs.python.org/dev/c-api/init.html#global-configuration-variables

They are used to populate PyConfig (PEP 587). At startup, the PyConfig is copied into these global configuration variables. After the Python initilization, they are no longer read, but PyConfig (tstate->interp->config) is read instead.

You can simply remove the two lines comment from pydebug.h.
msg368163 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-05-05 15:01
Got it, thanks for your explanation, victor ;)
msg368166 - (view) Author: miss-islington (miss-islington) Date: 2020-05-05 15:20
New changeset 6351d9e4400a77fe1fcbe4f03e5fb6620cca236d by Hai Shi in branch 'master':
bpo-40520: Remove redundant comment in pydebug.h (GH-19931)
https://github.com/python/cpython/commit/6351d9e4400a77fe1fcbe4f03e5fb6620cca236d
msg368167 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-05-05 15:22
Thanks hai shi :)
msg368170 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-05-05 15:27
Thanks, Dong-hee Na ;)