Skip to content

Commit ef3ef1f

Browse files
committed
Return a fresh dict from Server.namespace so callers cannot pollute shared state
Copilot flagged that Server.namespace returned the module-level _NAMESPACE_MAP directly, so a caller mutating the returned dict would have polluted every other Server instance in the process. Old namespace- handling code returned a per-instance dict, so no cross-instance pollution was possible. Wrap in dict(...) to restore that behavior.
1 parent fcd07ca commit ef3ef1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tableauserverclient/server/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def baseurl(self):
293293

294294
@property
295295
def namespace(self):
296-
return _NAMESPACE_MAP
296+
return dict(_NAMESPACE_MAP)
297297

298298
@property
299299
def auth_token(self):

0 commit comments

Comments
 (0)