Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant comment in pydebug.h #84700

Closed
shihai1991 opened this issue May 5, 2020 · 6 comments
Closed

Remove redundant comment in pydebug.h #84700

shihai1991 opened this issue May 5, 2020 · 6 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@shihai1991
Copy link
Member

BPO 40520
Nosy @ncoghlan, @vstinner, @corona10, @miss-islington, @shihai1991
PRs
  • bpo-40520: Port the declartions in pydebug.h to initconfig.h #19930
  • bpo-40520: Remove redundant comment in pydebug.h #19931
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-05-05.15:22:43.008>
    created_at = <Date 2020-05-05.14:45:19.094>
    labels = ['interpreter-core', '3.9']
    title = 'Remove redundant comment in pydebug.h'
    updated_at = <Date 2020-05-05.15:27:16.824>
    user = 'https://github.com/shihai1991'

    bugs.python.org fields:

    activity = <Date 2020-05-05.15:27:16.824>
    actor = 'shihai1991'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-05.15:22:43.008>
    closer = 'corona10'
    components = ['Interpreter Core']
    creation = <Date 2020-05-05.14:45:19.094>
    creator = 'shihai1991'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40520
    keywords = ['patch']
    message_count = 6.0
    messages = ['368158', '368160', '368163', '368166', '368167', '368170']
    nosy_count = 5.0
    nosy_names = ['ncoghlan', 'vstinner', 'corona10', 'miss-islington', 'shihai1991']
    pr_nums = ['19930', '19931']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40520'
    versions = ['Python 3.9']

    @shihai1991
    Copy link
    Member Author

    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](https://github.com/python/cpython/blob/main/Python/initconfig.c) now.
    If I understand clearly, those declarations should moved to [Include/cpython/initconfig.h](https://github.com/python/cpython/blob/main/Include/cpython/initconfig.h) and pydebug.h could be deleted.

    ref: d600951

    @shihai1991 shihai1991 added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 5, 2020
    @vstinner
    Copy link
    Member

    vstinner commented May 5, 2020

    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.

    @shihai1991
    Copy link
    Member Author

    Got it, thanks for your explanation, victor ;)

    @miss-islington
    Copy link
    Contributor

    New changeset 6351d9e by Hai Shi in branch 'master':
    bpo-40520: Remove redundant comment in pydebug.h (GH-19931)
    6351d9e

    @corona10 corona10 changed the title port the declartions in pydebug.h to initconfig.h Remove redundant comment in pydebug.h May 5, 2020
    @corona10 corona10 changed the title port the declartions in pydebug.h to initconfig.h Remove redundant comment in pydebug.h May 5, 2020
    @corona10
    Copy link
    Member

    corona10 commented May 5, 2020

    Thanks hai shi :)

    @shihai1991
    Copy link
    Member Author

    Thanks, Dong-hee Na ;)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants