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

Add threading.gettrace and threading.getprofile #86417

mariocj89 mannequin opened this issue Nov 3, 2020 · 2 comments

Add threading.gettrace and threading.getprofile #86417

mariocj89 mannequin opened this issue Nov 3, 2020 · 2 comments
3.10 stdlib


Copy link

@mariocj89 mariocj89 mannequin commented Nov 3, 2020

BPO 42251
Nosy @mariocj89, @pablogsal
  • #23125
  • 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-11-04.09:27:57.394>
    created_at = <Date 2020-11-03.13:15:23.623>
    labels = ['library', '3.10']
    title = 'Add threading.gettrace and threading.getprofile'
    updated_at = <Date 2020-11-04.09:28:10.989>
    user = '' fields:

    activity = <Date 2020-11-04.09:28:10.989>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-04.09:27:57.394>
    closer = 'pablogsal'
    components = ['Library (Lib)']
    creation = <Date 2020-11-03.13:15:23.623>
    creator = 'mariocj89'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42251
    keywords = ['patch']
    message_count = 2.0
    messages = ['380273', '380312']
    nosy_count = 2.0
    nosy_names = ['mariocj89', 'pablogsal']
    pr_nums = ['23125']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = ''
    versions = ['Python 3.10']

    Copy link
    Mannequin Author

    @mariocj89 mariocj89 mannequin commented Nov 3, 2020

    When working in a C extension from a non-python created thread which calls PyGILState_Ensure as it later calls a Python callback on user code, I wished there was a way to set the trace function similar to what a native Python thread would do.

    We could just call sys.gettrace within the thread, but the application might have chosen to set threading.settrace differently.

    Same applies for threading.setprofile.

    @mariocj89 mariocj89 mannequin added 3.10 stdlib labels Nov 3, 2020
    Copy link

    @pablogsal pablogsal commented Nov 4, 2020

    New changeset 0001a1b by Mario Corchero in branch 'master':
    bpo-42251: Add gettrace and getprofile to threading (GH-23125)

    @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
    3.10 stdlib
    None yet

    No branches or pull requests

    1 participant