Skip to content

Remove redundant comment in pydebug.h #84700

Closed

Description

@shihai1991
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']

    Activity

    1. shihai1991 commented on May 5, 2020

      @shihai1991
      MemberAuthor

      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

    2. vstinner commented on May 5, 2020

      @vstinner
      Member

      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.

    3. shihai1991 commented on May 5, 2020

      @shihai1991
      MemberAuthor

      Got it, thanks for your explanation, victor ;)

    4. miss-islington commented on May 5, 2020

      @miss-islington
      Contributor

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

    5. changed the title [-]port the declartions in pydebug.h to initconfig.h[/-] [+]Remove redundant comment in pydebug.h[/+] on May 5, 2020
    6. changed the title [-]port the declartions in pydebug.h to initconfig.h[/-] [+]Remove redundant comment in pydebug.h[/+] on May 5, 2020
    7. corona10 commented on May 5, 2020

      @corona10
      Member

      Thanks hai shi :)

    8. shihai1991 commented on May 5, 2020

      @shihai1991
      MemberAuthor

      Thanks, Dong-hee Na ;)

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions