threading.RLock
must not support *args, **kwargs
arguments
#102029
Labels
3.13
bugs and security fixes
extension-modules
C modules in the Modules dir
stdlib
Python modules in the Lib dir
type-bug
An unexpected behavior, bug, or error
Right now we have an interesting problem:
_CRLock
supports*args, **kwargs
in__new__
, while_PYRLock
does not.See:
cpython/Lib/threading.py
Line 133 in 128379b
cpython/Modules/_threadmodule.c
Line 506 in 128379b
I am leaving aside the problem that
_PYRLock
is not ever used (unless imported directly) for now.Right now our docs does not say what the signature should be.
Some facts:
RLock
with arguments (and never say it has arguments)*args, **kwargs
in theirRLock
's stub: https://github.com/python/typeshed/blob/0bb7d621d39d38bee7ce32e1ee920bd5bc4f9503/stdlib/threading.pyi#L113-L119RLock
's signatureSo, I think we can:
RLock
has()
signature*args, **kwargs
from C implDoes it sound like a plan? If yes, I would like to do the honours :)
Linked PRs
_PyRLock
inthreading
#102071The text was updated successfully, but these errors were encountered: