Skip to content

Commit 1a07788

Browse files
Set stack level and explicit warning type
1 parent 4fc9e64 commit 1a07788

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

distributed/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,9 @@ async def listen(self, port_or_addr=None, allow_offload=True, **kwargs):
731731
raise
732732
warnings.warn(
733733
f"Address {addr} is already in use.\n"
734-
f"Falling back to {fallback_port_or_addr} instead"
734+
f"Falling back to {fallback_port_or_addr} instead",
735+
UserWarning,
736+
stacklevel=2,
735737
)
736738
listener = await listen(
737739
fallback_port_or_addr,

0 commit comments

Comments
 (0)