Remove restriction against Semaphore having a negative value

Open
#61,576 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with the linked barrier.py demonstration and trace the Semaphore implementation and its existing tests in CPython. Determine where the non-negative-value restriction is enforced and how semaphore initialization is specified. Done means negative initial values are accepted consistently and the barrier demonstration is covered by passing tests.

Written by the indexing model from the issue text.

Description

stdlib type-feature
BPO 17374
Nosy @rhettinger, @amauryfa, @pitrou, @ezio-melotti
Files
  • barrier.py: Demonstrate a simple barrier using a semaphore with a negative value
  • 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 2013-03-07.08:57:52.050>
    labels = ['type-feature', 'library']
    title = 'Remove restriction against Semaphore having a negative\tvalue'
    updated_at = <Date 2013-03-20.14:56:05.254>
    user = 'https://github.com/rhettinger'
    

    bugs.python.org fields:

    activity = <Date 2013-03-20.14:56:05.254>
    actor = 'pitrou'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2013-03-07.08:57:52.050>
    creator = 'rhettinger'
    dependencies = []
    files = ['29334']
    hgrepos = []
    issue_num = 17374
    keywords = []
    message_count = 12.0
    messages = ['183642', '183643', '183647', '183649', '183651', '183901', '184752', '184757', '184759', '184761', '184763', '184767']
    nosy_count = 6.0
    nosy_names = ['rhettinger', 'amaury.forgeotdarc', 'pitrou', 'ezio.melotti', 'neologix', 'sbt']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17374'
    versions = ['Python 3.4']
    

    Dominant language
    Python
    Stars
    77.2k
    Forks
    36k
    Avg merge
    1d 9h
    Merged PRs (30d)
    558

    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.

    More from python/cpython

    All issues in python/cpython

    Similar issues

    More Python issues

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.