Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gsnedders opened this issue Jan 9, 2025 · 1 comment · May be fixed by #13390
Open

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

gsnedders opened this issue Jan 9, 2025 · 1 comment · May be fixed by #13390

Comments

@gsnedders
Copy link

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?)

@JelleZijlstra
Copy link
Member

PR welcome!

InFiNiTy0639 added a commit to InFiNiTy0639/typeshed that referenced this issue Jan 10, 2025
@AlexWaygood AlexWaygood linked a pull request Jan 11, 2025 that will close this issue
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 a pull request may close this issue.

2 participants