Skip to content

Reorganize pycore_pystate.h header #84449

Closed

Description

@vstinner
BPO 40268
Nosy @vstinner
PRs
  • bpo-40268: Add _PyInterpreterState_GetConfig() #19492
  • bpo-40268: Add pycore_rtstate.h header file #19493
  • bpo-40268: Include explicitly pycore_interp.h #19505
  • bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() #19509
  • bpo-40268: Remove a few pycore_pystate.h includes #19510
  • bpo-40268: Move _gc_runtime_state to pycore_gc.h #19515
  • bpo-40268: pythread.h is always included by Python.h #19529
  • bpo-40268: Remove unused structmember.h includes #19530
  • bpo-40268: Remove unused pycore_pymem.h includes #19531
  • bpo-40268: Remove unused osdefs.h includes #19532
  • bpo-40268: Remove unused imports in pylifecycle.c #19533
  • bpo-40268: Reformat posixmodule.c includes #19536
  • 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-04-15.13:50:06.991>
    created_at = <Date 2020-04-12.23:01:07.834>
    labels = ['interpreter-core', '3.9']
    title = 'Reorganize pycore_pystate.h header'
    updated_at = <Date 2020-04-15.13:50:06.990>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-04-15.13:50:06.990>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-15.13:50:06.991>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2020-04-12.23:01:07.834>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40268
    keywords = ['patch']
    message_count = 16.0
    messages = ['366274', '366279', '366292', '366352', '366378', '366385', '366395', '366398', '366465', '366466', '366467', '366469', '366472', '366477', '366510', '366516']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['19492', '19493', '19505', '19509', '19510', '19515', '19529', '19530', '19531', '19532', '19533', '19536']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40268'
    versions = ['Python 3.9']

    Activity

    1. vstinner commented on Apr 12, 2020

      @vstinner
      MemberAuthor

      Over the time, pycore_pystate.h header file becomes more and more complex. It exposes too many internals whereas most consumers only need basic functions like _PyThreadState_GET().

      I plan to use this issue as a placeholder for changes to reorganize pycore_pystate.h. I'm working on multiple pull requests.

    2. vstinner commented on Apr 13, 2020

      @vstinner
      MemberAuthor

      New changeset da7933e by Victor Stinner in branch 'master':
      bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)
      da7933e

    3. vstinner commented on Apr 13, 2020

      @vstinner
      MemberAuthor

      New changeset 1c4cbdf by Victor Stinner in branch 'master':
      bpo-40268: Add pycore_runtime.h header file (GH-19493)
      1c4cbdf

    4. vstinner commented on Apr 13, 2020

      @vstinner
      MemberAuthor

      New changeset 0c13e1f by Victor Stinner in branch 'master':
      bpo-40241: Add pycore_interp.h header (GH-19499)
      0c13e1f

    5. vstinner commented on Apr 14, 2020

      @vstinner
      MemberAuthor

      New changeset 4a3fe08 by Victor Stinner in branch 'master':
      bpo-40268: Include explicitly pycore_interp.h (GH-19505)
      4a3fe08

    6. vstinner commented on Apr 14, 2020

      @vstinner
      MemberAuthor

      New changeset 81a7be3 by Victor Stinner in branch 'master':
      bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)
      81a7be3

    7. vstinner commented on Apr 14, 2020

      @vstinner
      MemberAuthor

      New changeset e5014be by Victor Stinner in branch 'master':
      bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)
      e5014be

    8. vstinner commented on Apr 14, 2020

      @vstinner
      MemberAuthor

      New changeset e560f90 by Victor Stinner in branch 'master':
      bpo-40268: Move struct _gc_runtime_state to pycore_gc.h (GH-19515)
      e560f90

    9. vstinner commented on Apr 14, 2020

      @vstinner
      MemberAuthor

      See also bpo-2897: Deprecate structmember.h.

    10. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset 62183b8 by Victor Stinner in branch 'master':
      bpo-40268: Remove explicit pythread.h includes (bpo-19529)
      62183b8

    11. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset 4a21e57 by Victor Stinner in branch 'master':
      bpo-40268: Remove unused structmember.h includes (GH-19530)
      4a21e57

    12. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset d9ea5ca by Victor Stinner in branch 'master':
      bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)
      d9ea5ca

    13. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset 361dcdc by Victor Stinner in branch 'master':
      bpo-40268: Remove unused osdefs.h includes (GH-19532)
      361dcdc

    14. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset 4f98f46 by Victor Stinner in branch 'master':
      bpo-40268: Remove unused imports in pylifecycle.c (GH-19533)
      4f98f46

    15. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      New changeset 5eca75d by Victor Stinner in branch 'master':
      bpo-40268: Reformat posixmodule.c includes (GH-19536)
      5eca75d

    16. vstinner commented on Apr 15, 2020

      @vstinner
      MemberAuthor

      It exposes too many internals whereas most consumers only need basic functions like _PyThreadState_GET().

      That's basically done: pycore_pystate.h no longer defines PyInterpreterState structure. pycore_interp.h must now be included explicitly. It's now included by the following files:

      I also pushed many cleanup changes. I think that it's now enough, I close the issue ;-)

    17. 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