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

Deprecate _PyObject_GC_TRACK() in Python 3.6 #79410

Closed
vstinner opened this issue Nov 13, 2018 · 4 comments
Closed

Deprecate _PyObject_GC_TRACK() in Python 3.6 #79410

vstinner opened this issue Nov 13, 2018 · 4 comments
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

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

    @vstinner
    Copy link
    Member Author

    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.

    @vstinner vstinner added the 3.7 (EOL) end of life label Nov 13, 2018
    @vstinner
    Copy link
    Member Author

    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 :-)

    @vstinner
    Copy link
    Member Author

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

    @miss-islington
    Copy link
    Contributor

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

    @vstinner vstinner added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 13, 2018
    @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.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants