python / python/cpython

Intercepting thread lock objects not working under context managers

Open
#86,871 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.10 3.7 (EOL) 3.8 (EOL) 3.9 (EOL) docs topic-profiling type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 42705
Nosy @rhettinger, @vstinner, @merwok, @dstufft, @mhmdkanj
Files
  • tracing-locking-mechanisms.py
  • 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 = None
    created_at = <Date 2020-12-21.15:11:17.394>
    labels = ['type-bug', '3.8', '3.9', '3.10', 'expert-C-API', '3.7', 'docs']
    title = 'Intercepting thread lock objects not working under context managers'
    updated_at = <Date 2021-01-17.12:27:24.728>
    user = 'https://github.com/mhmdkanj'
    

    bugs.python.org fields:

    activity = <Date 2021-01-17.12:27:24.728>
    actor = 'jkloth'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Demos and Tools', 'Documentation', 'C API']
    creation = <Date 2020-12-21.15:11:17.394>
    creator = 'mhmdkanj'
    dependencies = []
    files = ['49695']
    hgrepos = []
    issue_num = 42705
    keywords = []
    message_count = 3.0
    messages = ['383530', '383557', '383560']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'vstinner', 'eric.araujo', 'docs@python', 'dstufft', 'mhmdkanj']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42705'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']
    

    Contributor guide

    Open the contributing guide

    First steps

    1. Read the whole issue, then the project's contributing guide.
    2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
    3. Fork the repository and make your change on a branch.
    4. Open a pull request that references the issue number.

    Research direction

    Start by reading and running the attached tracing-locking-mechanisms.py reproducer, then inspect the relevant Python C API documentation and lock/context-manager behavior. Determine why interception fails only when locks are used as context managers; done means the reproducer works in that form and the affected documentation or behavior is covered.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    c, python
    Domain
    api, documentation
    Issue type
    Bug
    Difficulty
    4/5
    Estimated time
    3-5 days
    Activity status
    Stale
    Clarity
    Needs clarification
    Newbie friendliness
    25/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.