There was an error while loading. Please reload this page.
warnings
threading
1 parent 49f2465 commit 99ed302Copy full SHA for 99ed302
2 files changed
Lib/threading.py
@@ -3,7 +3,6 @@
3
import os as _os
4
import sys as _sys
5
import _thread
6
-import warnings
7
8
from time import monotonic as _time
9
from _weakrefset import WeakSet
@@ -133,6 +132,7 @@ def RLock(*args, **kwargs):
133
132
134
"""
135
if args or kwargs:
+ import warnings
136
warnings.warn(
137
'Passing arguments to RLock is deprecated and will be removed in 3.15',
138
DeprecationWarning,
Misc/NEWS.d/next/Library/2025-01-29-11-14-20.gh-issue-118761.gMZwE1.rst
@@ -0,0 +1,2 @@
1
+Always lazy import ``warnings`` in :mod:`threading`. Patch by Taneli
2
+Hukkinen.
0 commit comments