Skip to content

[3.15] gh-89554: Document _thread.LockType as a class (GH-150684) - #150785

Merged
vstinner merged 1 commit into
python:3.15from
miss-islington:backport-e37ce56-3.15
Jun 2, 2026
Merged

[3.15] gh-89554: Document _thread.LockType as a class (GH-150684)#150785
vstinner merged 1 commit into
python:3.15from
miss-islington:backport-e37ce56-3.15

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

_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 e37ce56)

Co-authored-by: Bernát Gábor gaborjbernat@gmail.com

_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 e37ce56)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
@bedevere-appbedevere-appBot added skip news awaiting review docs Documentation in the Doc dir labels Jun 2, 2026
@vstinner
vstinner enabled auto-merge (squash) June 2, 2026 12:59
@vstinner
vstinner merged commit c5248b7 into python:3.15Jun 2, 2026
38 checks passed
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsJun 2, 2026
@miss-islington
miss-islington deleted the backport-e37ce56-3.15 branch June 2, 2026 13:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

@miss-islington@vstinner@gaborbernat