From 30728223798f0c610bb2580eb4e66bdfe8b2ce9f Mon Sep 17 00:00:00 2001 From: Jeremy Cantrell Date: Tue, 31 Mar 2026 14:56:58 -0400 Subject: [PATCH] Fix `threading.Thread` argument `context` type --- stdlib/threading.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/threading.pyi b/stdlib/threading.pyi index abc7fe7e8124..03c8865d3c0a 100644 --- a/stdlib/threading.pyi +++ b/stdlib/threading.pyi @@ -3,7 +3,7 @@ import sys from _thread import _ExceptHookArgs, get_native_id as get_native_id from _typeshed import ProfileFunction, TraceFunction from collections.abc import Callable, Iterable, Mapping -from contextvars import ContextVar +from contextvars import Context from types import TracebackType from typing import Any, Final, TypeVar, final from typing_extensions import deprecated @@ -87,7 +87,7 @@ class Thread: kwargs: Mapping[str, Any] | None = None, *, daemon: bool | None = None, - context: ContextVar[Any] | None = None, + context: Context | None = None, ) -> None: ... else: def __init__(