mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-102029: Deprecate passing arguments to _PyRLock in threading (#102071)
This commit is contained in:
parent
0b243c2f66
commit
80f30cf51b
4 changed files with 38 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import os as _os
|
|||
import sys as _sys
|
||||
import _thread
|
||||
import functools
|
||||
import warnings
|
||||
|
||||
from time import monotonic as _time
|
||||
from _weakrefset import WeakSet
|
||||
|
|
@ -116,6 +117,12 @@ def RLock(*args, **kwargs):
|
|||
acquired it.
|
||||
|
||||
"""
|
||||
if args or kwargs:
|
||||
warnings.warn(
|
||||
'Passing arguments to RLock is deprecated and will be removed in 3.15',
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
if _CRLock is None:
|
||||
return _PyRLock(*args, **kwargs)
|
||||
return _CRLock(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue