Sitelet https://github.com/python/cpython/pull/111118/commits/29e0adf39a2d95253007af583311a836888c6d64
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use ~io.IOBase.fileno
  • Loading branch information
hugovk committed Oct 23, 2023
commit 29e0adf39a2d95253007af583311a836888c6d64
2 changes: 1 addition & 1 deletion Doc/library/mmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the current file position, and :meth:`seek` through the file to different positi
A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
different on Unix and on Windows. In either case you must provide a file
descriptor for a file opened for update. If you wish to map an existing Python
file object, use its :meth:`!fileno` method to obtain the correct value for the
file object, use its :meth:`~io.IOBase.fileno` method to obtain the correct value for the
*fileno* parameter. Otherwise, you can open the file using the
:func:`os.open` function, which returns a file descriptor directly (the file
still needs to be closed when done).
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2582,7 +2582,7 @@ multiple connections at the same time.
**Windows**: An item in *object_list* must either be an integer
handle which is waitable (according to the definition used by the
documentation of the Win32 function ``WaitForMultipleObjects()``)
or it can be an object with a :meth:`!fileno` method which returns a
or it can be an object with a :meth:`~io.IOBase.fileno` method which returns a
socket handle or pipe handle. (Note that pipe handles and socket
handles are **not** waitable handles.)

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/selectors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It defines a :class:`BaseSelector` abstract base class, along with several
concrete implementations (:class:`KqueueSelector`, :class:`EpollSelector`...),
that can be used to wait for I/O readiness notification on multiple file
objects. In the following, "file object" refers to any object with a
:meth:`!fileno()` method, or a raw file descriptor. See :term:`file object`.
:meth:`~io.IOBase.fileno` method, or a raw file descriptor. See :term:`file object`.

:class:`DefaultSelector` is an alias to the most efficient implementation
available on the current platform: this should be the default choice for most
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
.. function:: fromfd(fd, family, type, proto=0)

Duplicate the file descriptor *fd* (an integer as returned by a file object's
:meth:`!fileno` method) and build a socket object from the result. Address
:meth:`~io.IOBase.fileno` method) and build a socket object from the result. Address
family, socket type and protocol number are as for the :func:`.socket` function
above. The file descriptor should refer to a socket, but this is not checked ---
subsequent operations on the object may fail if the file descriptor is invalid.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/tempfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The module defines the following user-callable items:

This class operates exactly as :func:`TemporaryFile` does, except that
data is spooled in memory until the file size exceeds *max_size*, or
until the file's :func:`!fileno` method is called, at which point the
until the file's :func:`~io.IOBase.fileno` method is called, at which point the
contents are written to disk and operation proceeds as with
:func:`TemporaryFile`.

Expand Down