Open
Description
Since python/cpython@74723e1 (in CPython 3.13 and later), a variety of calls of Handler.acquire()
and Handler.release()
got converted into with Handler.lock
.
As a result, unless you're overriding Handler.handle
, Handler.lock
cannot be None, which it could be previously.
Note that logging.NullHandler
does actually set lock
to None in the stdlib, but it does override Handler.handle
.
I’m unsure about the policy for typeshed is about instance variables whose valid values depend on whether a particular method is overridden.
Metadata
Assignees
Labels
No labels