[issue25605] fcntl doc: document exceptions raised on error for ioctl() and flock()
New submission from STINNER Victor: Attached patch documents the exception raised when ioctl() or flock() functions fail. Note: flock() can also raises a ValueError if the second parameter (op) is unknown. If the patch is approved, I will write a similar patch for Python 3 (just replace IOError with OSError in Python 3 doc). Python 2 online doc: https://docs.python.org/2/library/fcntl.html Python 3 online doc: https://docs.python.org/dev/library/fcntl.html ---------- assignee: docs@python components: Documentation files: fcntl_doc.patch keywords: patch messages: 254524 nosy: docs@python, haypo priority: normal severity: normal status: open title: fcntl doc: document exceptions raised on error for ioctl() and flock() versions: Python 2.7 Added file: http://bugs.python.org/file41020/fcntl_doc.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25605> _______________________________________
Martin Panter added the comment: This looks good for Python 2 and the equivalent for Python 3. FWIW the ValueError case is platform-dependent. On Linux, I see EINVAL (the IOError version of ValueError):
flock(0, LOCK_UN) flock(0, 0) Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 22] Invalid argument
---------- nosy: +martin.panter _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25605> _______________________________________
Roundup Robot added the comment: New changeset d3d974e92e6f by Victor Stinner in branch '2.7': Issue #25605: Document exceptions raised by fcntl.ioctl() and fcntl.flock() https://hg.python.org/cpython/rev/d3d974e92e6f New changeset f82cd1ed659e by Victor Stinner in branch '3.4': Issue #25605: Document exceptions raised by fcntl.ioctl() and fcntl.flock() https://hg.python.org/cpython/rev/f82cd1ed659e New changeset cf69fe41f873 by Victor Stinner in branch '3.5': Merge 3.4 (issue #25605) https://hg.python.org/cpython/rev/cf69fe41f873 New changeset 0eddeb57c3d6 by Victor Stinner in branch 'default': Merge 3.5 (issue #25605) https://hg.python.org/cpython/rev/0eddeb57c3d6 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25605> _______________________________________
STINNER Victor added the comment: Thanks for the review. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue25605> _______________________________________
participants (3)
-
Martin Panter -
Roundup Robot -
STINNER Victor