]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-89554: Document _thread.LockType as a class (#150684) (#150786)
authorVictor Stinner <vstinner@python.org>
Tue, 2 Jun 2026 13:13:35 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Tue, 2 Jun 2026 13:13:35 +0000 (15:13 +0200)
commit13d8f452a11dc58690cb7aba0cad39bcca18f465
tree54300ccf7f243c0fa270fcdeeb3b342bd658908d
parentb8ce8a38d172e83690c01902856160107262e71c
[3.13] gh-89554: Document _thread.LockType as a class (#150684) (#150786)

gh-89554: Document _thread.LockType as a class (#150684)

_thread.LockType is a class (the type of lock objects), but was documented
with the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", move it next to the lock methods, and
document acquire(), release() and locked() as methods of the class.  Keep
the old _thread.lock.* URL fragments working with raw HTML anchors.

(cherry picked from commit e37ce569773b5e4e5c0e6042d4adfde2e9608f13)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
Doc/library/_thread.rst