← 输入框|github.com|刷新
Skip to content

Add threading.gettrace and threading.getprofile #86417

Closed

Description

@mariocj89
mannequin
BPO 42251
Nosy @mariocj89, @pablogsal
PRs
  • bpo-42251: Add gettrace and getprofile to threading #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 = 'https://github.com/mariocj89'

    bugs.python.org 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 = 'https://bugs.python.org/issue42251'
    versions = ['Python 3.10']

    Activity

    1. mariocj89 commented on Nov 3, 2020

      mariocj89mannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Nov 3, 2020
    3. pablogsal commented on Nov 4, 2020

      @pablogsal
      Member

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

    4. 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.10 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directory

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions