threading.RLock must not support *args, **kwargs arguments
#102029
Labels
3.13
new features, 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:
_CRLocksupports*args, **kwargsin__new__, while_PYRLockdoes 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
_PYRLockis not ever used (unless imported directly) for now.Right now our docs does not say what the signature should be.
Some facts:
RLockwith arguments (and never say it has arguments)*args, **kwargsin theirRLock's stub: https://github.com/python/typeshed/blob/0bb7d621d39d38bee7ce32e1ee920bd5bc4f9503/stdlib/threading.pyi#L113-L119RLock's signatureSo, I think we can:
RLockhas()signature*args, **kwargsfrom C implDoes it sound like a plan? If yes, I would like to do the honours :)
Linked PRs
_PyRLockinthreading#102071The text was updated successfully, but these errors were encountered: