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

threading.Lock documentation conflict #59222

Closed
akheron opened this issue Jun 6, 2012 · 2 comments
Closed

threading.Lock documentation conflict #59222

akheron opened this issue Jun 6, 2012 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir easy stdlib Python modules in the Lib dir

Comments

@akheron
Copy link
Member

akheron commented Jun 6, 2012

BPO 15017
Nosy @bitdancer, @akheron
Superseder
  • bpo-14502: Document better what happens on releasing an unacquired lock
  • 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 = 'https://github.com/akheron'
    closed_at = <Date 2012-06-06.13:14:50.876>
    created_at = <Date 2012-06-06.10:40:12.811>
    labels = ['easy', 'library', 'docs']
    title = 'threading.Lock documentation conflict'
    updated_at = <Date 2012-06-06.13:14:50.874>
    user = 'https://github.com/akheron'

    bugs.python.org fields:

    activity = <Date 2012-06-06.13:14:50.874>
    actor = 'r.david.murray'
    assignee = 'petri.lehtinen'
    closed = True
    closed_date = <Date 2012-06-06.13:14:50.876>
    closer = 'r.david.murray'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2012-06-06.10:40:12.811>
    creator = 'petri.lehtinen'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 15017
    keywords = ['easy']
    message_count = 2.0
    messages = ['162401', '162409']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'petri.lehtinen']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '14502'
    type = None
    url = 'https://bugs.python.org/issue15017'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @akheron
    Copy link
    Member Author

    akheron commented Jun 6, 2012

    In the description of section 16.2.2. Lock objects:

    If an attempt is made to release an unlocked lock, a RuntimeError
    will be raised.
    

    In the description of Lock.release():

    When invoked on an unlocked lock, a ThreadError is raised.
    

    Apparently, ThreadError is the correct exception.

    @akheron akheron self-assigned this Jun 6, 2012
    @akheron akheron added docs Documentation in the Doc dir stdlib Python modules in the Lib dir easy labels Jun 6, 2012
    @bitdancer
    Copy link
    Member

    There's already an issue for this (bpo-14502), which is closed. If the docs are still wrong you should probably reopen that one, since it has discussion of the issues involved. (Note, however, that ThreadError is RuntimeError, so technically the docs are not *in*correct :)

    @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
    docs Documentation in the Doc dir easy stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants