From 2e46b9da38a7dca4a7ff077e62bc4a248c7e47bc Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 15:04:25 +0000 Subject: [PATCH] Fix stale references in fcntl-related docs - Fix typo in Doc/faq/library.rst: :func:`fcntl.fnctl` -> :func:`fcntl.fcntl` - Fix inconsistent markup in Doc/library/fcntl.rst: use :mod:`!fcntl` (self-link suppression) consistently in versionchanged 3.12 entry and fcntl() function description, matching the rest of the file Co-Authored-By: cameron bica --- Doc/faq/library.rst | 2 +- Doc/library/fcntl.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst index d8d75ca6f2ec96c..8249e177e9535e7 100644 --- a/Doc/faq/library.rst +++ b/Doc/faq/library.rst @@ -221,7 +221,7 @@ using curses, but curses is a fairly large module to learn. this code, characters are read and printed one at a time. :func:`termios.tcsetattr` turns off stdin's echoing and disables canonical - mode. :func:`fcntl.fnctl` is used to obtain stdin's file descriptor flags + mode. :func:`fcntl.fcntl` is used to obtain stdin's file descriptor flags and modify them for non-blocking mode. Since reading stdin when it is empty results in an :exc:`OSError`, this error is caught and ignored. diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst index 3dcfe3b87f93d63..161f013ef60ec0e 100644 --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -53,7 +53,7 @@ descriptor. the latter setting ``FD_CLOEXEC`` flag in addition. .. versionchanged:: 3.12 - On Linux >= 4.5, the :mod:`fcntl` module exposes the ``FICLONE`` and + On Linux >= 4.5, the :mod:`!fcntl` module exposes the ``FICLONE`` and ``FICLONERANGE`` constants, which allow to share some data of one file with another file by reflinking on some filesystems (e.g., btrfs, OCFS2, and XFS). This behavior is commonly referred to as "copy-on-write". @@ -87,7 +87,7 @@ The module defines the following functions: Perform the operation *cmd* on file descriptor *fd* (file objects providing a :meth:`~io.IOBase.fileno` method are accepted as well). The values used for *cmd* are operating system dependent, and are available as constants - in the :mod:`fcntl` module, using the same names as used in the relevant C + in the :mod:`!fcntl` module, using the same names as used in the relevant C header files. The argument *arg* can either be an integer value, a :class:`bytes` object, or a string. The type and size of *arg* must match the type and size of