@@ -188,7 +188,7 @@ def default_secure(cfg: t.Any) -> None: # pragma: no cover
188
188
If Session.key/keyfile have not been set, set Session.key to
189
189
a new random UUID.
190
190
"""
191
- warnings .warn ("default_secure is deprecated" , DeprecationWarning )
191
+ warnings .warn ("default_secure is deprecated" , DeprecationWarning , stacklevel = 2 )
192
192
if "Session" in cfg and ("key" in cfg .Session or "keyfile" in cfg .Session ):
193
193
return
194
194
# key/keyfile not specified, generate new UUID:
@@ -567,7 +567,7 @@ def __init__(self, **kwargs):
567
567
self ._check_packers ()
568
568
self .none = self .pack ({})
569
569
# ensure self._session_default() if necessary, so bsession is defined:
570
- self .session
570
+ self .session # noqa
571
571
self .pid = os .getpid ()
572
572
self ._new_auth ()
573
573
if not self .key :
@@ -861,9 +861,9 @@ def send(
861
861
stream .send_multipart (to_send , copy = copy )
862
862
863
863
if self .debug :
864
- pprint .pprint (msg )
865
- pprint .pprint (to_send )
866
- pprint .pprint (buffers )
864
+ pprint .pprint (msg ) # noqa
865
+ pprint .pprint (to_send ) # noqa
866
+ pprint .pprint (buffers ) # noqa
867
867
868
868
msg ["tracker" ] = tracker
869
869
@@ -1088,7 +1088,7 @@ def deserialize(
1088
1088
buffers = [memoryview (bytes (b .bytes )) for b in msg_list [5 :]]
1089
1089
message ["buffers" ] = buffers
1090
1090
if self .debug :
1091
- pprint .pprint (message )
1091
+ pprint .pprint (message ) # noqa
1092
1092
# adapt to the current version
1093
1093
return adapt (message )
1094
1094
@@ -1098,5 +1098,6 @@ def unserialize(self, *args: t.Any, **kwargs: t.Any) -> t.Dict[str, t.Any]:
1098
1098
warnings .warn (
1099
1099
"Session.unserialize is deprecated. Use Session.deserialize." ,
1100
1100
DeprecationWarning ,
1101
+ stacklevel = 2 ,
1101
1102
)
1102
1103
return self .deserialize (* args , ** kwargs )
0 commit comments