Unverified Commit 0dc72273 authored by Nick Hill's avatar Nick Hill Committed by GitHub
Browse files

[BugFix] Fix ipv4 address parsing regression (#3645)

parent a979d977
...@@ -205,7 +205,9 @@ def get_ip() -> str: ...@@ -205,7 +205,9 @@ def get_ip() -> str:
def get_distributed_init_method(ip: str, port: int) -> str: def get_distributed_init_method(ip: str, port: int) -> str:
return f"tcp://[{ip}]:{port}" # Brackets are not permitted in ipv4 addresses,
# see https://github.com/python/cpython/issues/103848
return f"tcp://[{ip}]:{port}" if ":" in ip else f"tcp://{ip}:{port}"
def get_open_port() -> int: def get_open_port() -> int:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment