Skip to content

Use threading.RLock for logging.Handler.lock#16022

Draft
pctablet505 wants to merge 1 commit into
python:mainfrom
pctablet505:fix-handler-lock-rlock
Draft

Use threading.RLock for logging.Handler.lock#16022
pctablet505 wants to merge 1 commit into
python:mainfrom
pctablet505:fix-handler-lock-rlock

Conversation

@pctablet505

Copy link
Copy Markdown

CPython's logging.Handler has stored an RLock (not a plain Lock) in its lock attribute since Python 2.5. threading.RLock is not a subclass of threading.Lock, so the existing stub type was inaccurate.

Fixes #13382

CPython's logging.Handler has used an RLock (not a Lock) since
Python 2.5, and RLock is not a subclass of Lock, so the stub type
was inaccurate.

Fixes python#13382
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

logging.Handler.lock should actually be threading.RLock

1 participant