Skip to content

Commit 5e34326

Browse files
authored
Add proper stacklevel to method_allowlist warning
1 parent 361f1e2 commit 5e34326

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/urllib3/util/retry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ def __init__(
253253
"Using 'method_whitelist' with Retry is deprecated and "
254254
"will be removed in v2.0. Use 'allowed_methods' instead",
255255
DeprecationWarning,
256+
stacklevel=2,
256257
)
257258
allowed_methods = method_whitelist
258259
if allowed_methods is _Default:

0 commit comments

Comments
 (0)