Set this thread's context to context.
(context)
| 368 | return context |
| 369 | |
| 370 | def setcontext(context): |
| 371 | """Set this thread's context to context.""" |
| 372 | if context in (DefaultContext, BasicContext, ExtendedContext): |
| 373 | context = context.copy() |
| 374 | context.clear_flags() |
| 375 | _current_context_var.set(context) |
| 376 | |
| 377 | del contextvars # Don't contaminate the namespace |
| 378 |
searching dependent graphs…