mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-118761: Always lazy import warnings
in threading
(#129428)
This commit is contained in:
parent
49f24650e4
commit
99ed3025fe
2 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,6 @@
|
|||
import os as _os
|
||||
import sys as _sys
|
||||
import _thread
|
||||
import warnings
|
||||
|
||||
from time import monotonic as _time
|
||||
from _weakrefset import WeakSet
|
||||
|
@ -133,6 +132,7 @@ def RLock(*args, **kwargs):
|
|||
|
||||
"""
|
||||
if args or kwargs:
|
||||
import warnings
|
||||
warnings.warn(
|
||||
'Passing arguments to RLock is deprecated and will be removed in 3.15',
|
||||
DeprecationWarning,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue