Skip to content

Commit 5b87911

Browse files
committed
Stacklevel 4 for constructor
1 parent ce05c69 commit 5b87911

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/read_preferences.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _validate_hedge(hedge: Optional[_Hedge]) -> Optional[_Hedge]:
107107
warnings.warn(
108108
"The read preference 'hedge' option is deprecated in PyMongo 4.12+ because hedged reads are deprecated in MongoDB version 8.0+. Support for 'hedge' will be removed in PyMongo 5.0.",
109109
DeprecationWarning,
110-
stacklevel=2,
110+
stacklevel=4,
111111
)
112112
return hedge
113113

0 commit comments

Comments
 (0)