Setting a dictionary as ContextVar default: …kinda works, as the dictionary will be available as default, but it always references the same instance, instead of generating a new one for each context. Do contextvars somehow support factories (for dicts, lists, and alike), as in: Or do I just have to do it manually: Answer Apparently ContextVars designed choice was in