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

Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState) #82999

Closed
vstinner opened this issue Nov 16, 2019 · 3 comments
Closed

Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState) #82999

vstinner opened this issue Nov 16, 2019 · 3 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@vstinner
Copy link
Member

BPO 38818
Nosy @brettcannon, @vstinner
PRs
  • bpo-38818: PyInterpreterState.eval_frame now pass tstate #17187
  • bpo-38500: Add PyInterpreterState_SetEvalFrameFunc() #17352
  • bpo-38500: Add _PyInterpreterState_SetEvalFrameFunc() #17340
  • Superseder
  • bpo-38500: PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)
  • 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-03-10.17:32:12.929>
    created_at = <Date 2019-11-16.00:11:33.847>
    labels = ['interpreter-core', '3.9']
    title = 'Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState)'
    updated_at = <Date 2020-03-10.17:34:08.637>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2020-03-10.17:34:08.637>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-10.17:32:12.929>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2019-11-16.00:11:33.847>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38818
    keywords = ['patch']
    message_count = 3.0
    messages = ['356736', '356894', '363832']
    nosy_count = 2.0
    nosy_names = ['brett.cannon', 'vstinner']
    pr_nums = ['17187', '17352', '17340']
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '38500'
    type = None
    url = 'https://bugs.python.org/issue38818'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    Follow-up of bpo-36710 and bpo-38644: I would like to pass explicitly tstate (PyThreadState) to internal C functions.

    The problem is that PyInterpreterState.eval_frame function has no tstate parameter. I propose attached PR to add a tstate parameter. It's a backward incompatible change. The "eval_frame" field comes from the PEP-523.

    See also bpo-38500 "Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals".

    @vstinner vstinner added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Nov 16, 2019
    @brettcannon
    Copy link
    Member

    I think bpo-38500 needs to get resolved first before this as that will affect whether this is acceptable or not as an API-breaking change.

    @vstinner
    Copy link
    Member Author

    I mark this issue as a duplicate of bpo-38500.

    @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

    2 participants