Set this thread's context to context.
(context)
| 460 | return context |
| 461 | |
| 462 | def setcontext(context): |
| 463 | """Set this thread's context to context.""" |
| 464 | if context in (DefaultContext, BasicContext, ExtendedContext): |
| 465 | context = context.copy() |
| 466 | context.clear_flags() |
| 467 | _current_context_var.set(context) |
| 468 | |
| 469 | del contextvars # Don't contaminate the namespace |
| 470 |
no test coverage detected