chore: vendor sglang v0.5.10 snapshot
This commit is contained in:
14
third_party/sglang/sgl-model-gateway/e2e_test/fixtures/ports.py
vendored
Normal file
14
third_party/sglang/sgl-model-gateway/e2e_test/fixtures/ports.py
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"""Legacy port utilities.
|
||||
|
||||
DEPRECATED: This module will be removed during e2e_response_api migration.
|
||||
Use infra.get_open_port() instead.
|
||||
"""
|
||||
|
||||
import socket
|
||||
|
||||
|
||||
def find_free_port() -> int:
|
||||
"""Return an available TCP port on localhost."""
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
s.bind(("127.0.0.1", 0))
|
||||
return s.getsockname()[1]
|
||||
Reference in New Issue
Block a user