From da0a8443b4a83353b70c90a171c8b38edae0eca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 31 May 2026 10:10:32 -0700 Subject: [PATCH] gh-89554: Document socket, thread and expat type objects as classes socket.SocketType, _thread.LockType and xml.parsers.expat.XMLParserType are classes (the type objects for socket, lock and expat parser objects), but were documented with the ".. data::" directive, so ":class:" cross-references to them cannot resolve against a py:class target. Switch these three entries to ".. class::". --- Doc/library/_thread.rst | 2 +- Doc/library/pyexpat.rst | 2 +- Doc/library/socket.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst index 47f5eabb6f2180..0d7796b6c47495 100644 --- a/Doc/library/_thread.rst +++ b/Doc/library/_thread.rst @@ -36,7 +36,7 @@ This module defines the following constants and functions: This is now a synonym of the built-in :exc:`RuntimeError`. -.. data:: LockType +.. class:: LockType This is the type of lock objects. diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index c88411ce0b7b91..bba94cec180a60 100644 --- a/Doc/library/pyexpat.rst +++ b/Doc/library/pyexpat.rst @@ -49,7 +49,7 @@ This module provides one exception and one type object: Alias for :exc:`ExpatError`. -.. data:: XMLParserType +.. class:: XMLParserType The type of the return values from the :func:`ParserCreate` function. diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 96bc9e7a0d61e3..ba2c2b8bcaf0cb 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1025,7 +1025,7 @@ The following functions all create :ref:`socket objects `. .. versionadded:: 3.3 -.. data:: SocketType +.. class:: SocketType This is a Python type object that represents the socket object type. It is the same as ``type(socket(...))``.