Skip to content

Deprecate _PyObject_GC_TRACK() in Python 3.6 #79410

Closed

Description

@vstinner
BPO 35229
Nosy @vstinner, @miss-islington
PRs
  • [3.7] bpo-35229: Deprecate _PyObject_GC_TRACK() #10511
  • [3.6] bpo-35229: Deprecate _PyObject_GC_TRACK() (GH-10511) #10512
  • 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 2018-11-13.14:01:22.146>
    created_at = <Date 2018-11-13.11:49:14.251>
    labels = ['interpreter-core', '3.7']
    title = 'Deprecate _PyObject_GC_TRACK() in Python 3.6'
    updated_at = <Date 2018-11-13.14:01:22.145>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-11-13.14:01:22.145>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-11-13.14:01:22.146>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2018-11-13.11:49:14.251>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35229
    keywords = ['patch']
    message_count = 4.0
    messages = ['329829', '329831', '329832', '329836']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'miss-islington']
    pr_nums = ['10511', '10512']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35229'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. vstinner commented on Nov 13, 2018

      @vstinner
      MemberAuthor

      The _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros are documented:

      The documentation says "It should not be used for extension modules."

      These macros have been broken in Python 3.7 by Eric Snow's work on moving internal APIs to Include/internal/: _PyObject_GC_TRACK() access _PyRuntime.gc.generation0, whereas accessing _PyRuntime requires to include Include/internal/pycore_pystate.h (header previously called Include/internal/pystate.h in Python 3.7) which is not installed by "make install".

      My PR 10507 moved these macros to Include/internal/ to clarify that they must not be used outside CPython internals.

      I suggest to deprecate them in Python 3.6: just add a note in Python 3.6 and 3.7 documentation.

    2. vstinner commented on Nov 13, 2018

      @vstinner
      MemberAuthor

      These macros have been broken in Python 3.7 by Eric Snow's work on moving internal APIs to Include/internal/ (...)

      Oh, I forgot to mention that IMHO it's perfectly fine :-)

    3. vstinner commented on Nov 13, 2018

      @vstinner
      MemberAuthor

      New changeset 55b4771 by Victor Stinner in branch '3.7':
      bpo-35229: Deprecate _PyObject_GC_TRACK() (GH-10511)
      55b4771

    4. miss-islington commented on Nov 13, 2018

      @miss-islington
      Contributor

      New changeset 60a6bae by Miss Islington (bot) in branch '3.6':
      bpo-35229: Deprecate _PyObject_GC_TRACK() (GH-10511)
      60a6bae

    5. 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.7 (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