Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Client(..., security=False) #8980

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distributed/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ def __init__(
if security is None and isinstance(address, str):
security = _maybe_call_security_loader(address)

if security is None:
if security is None or security is False:
security = Security()
elif isinstance(security, dict):
security = Security(**security)
Expand Down
10 changes: 10 additions & 0 deletions distributed/tests/test_tls_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,16 @@ async def test_security_dict_input_no_security():
assert result == 2


@gen_test()
async def test_security_bool_input_disabled_security():
async with Scheduler(dashboard_address=":0", security=False) as s:
async with Worker(s.address, security=False):
async with Client(s.address, security=False, asynchronous=True) as c:
result = await c.submit(inc, 1)
assert c.security.require_encryption is False
assert result == 2


@gen_test()
async def test_security_dict_input():
conf = tls_config()
Expand Down
Loading