Skip to content

logging.Handler.lock should actually be threading.RLock #13382

Open
@gsnedders

Description

We have:

https://github.com/python/typeshed/blob/614e9499f145e9dccade16d906247276f1d5e6aa/stdlib/logging/__init__.pyi#L249C11-L249C25

However, the stdlib actually uses an RLock (and has done since CPython 2.5, python/cpython@4a70486):

https://github.com/python/cpython/blob/7dc41ad6a7826ffc675f088972de96624917696e/Lib/logging/__init__.py#L961

Note that RLock is not a subclass of Lock.

See also #13381 (Should logging.Handler.lock allow None?)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions