Open
Description
I found some bugs about CallContext when I changed this jupyter to suppor multi-user/tenancy ,
@classmethod
def _get_map(cls) -> Dict[str, Any]:
"""Get the map of names to their values from the _NAME_VALUE_MAP context var.
If the map does not exist in the current context, an empty map is created and returned.
"""
ctx: Context = copy_context()
if CallContext._name_value_map not in ctx:
CallContext._name_value_map.set({})
return CallContext._name_value_map.get()
copy_context is a shallow copy,_name_value_map is a dict,so when multi user visite jupyter,if we record some user infomation in context , it will casue context values bleeding