Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ requires-python = ">= 3.10"
dependencies = [
"exceptiongroup >= 1.0.2; python_version < '3.11'",
"idna >= 2.8",
"typing_extensions >= 4.5; python_version < '3.13'",
"typing_extensions >= 4.16.0; python_version < '3.15'",
]
dynamic = ["version"]

Expand Down
5 changes: 4 additions & 1 deletion src/anyio/_backends/_trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
if TYPE_CHECKING:
from _typeshed import FileDescriptorLike

if sys.version_info < (3, 15):
from typing_extensions import sentinel

if sys.version_info >= (3, 11):
from typing import TypeVarTuple, Unpack
else:
Expand Down Expand Up @@ -195,7 +198,7 @@ def shield(self, value: bool) -> None:
# Task groups
#

empty_start_value = object()
empty_start_value = sentinel("empty_start_value")


class _TrioTaskStatus(Generic[T_contra], abc.TaskStatus[T_contra]):
Expand Down
6 changes: 5 additions & 1 deletion src/anyio/_core/_typedattr.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
from __future__ import annotations

import sys
from collections.abc import Callable, Mapping
from typing import Any, TypeVar, final, overload

from ._exceptions import TypedAttributeLookupError

if sys.version_info < (3, 15):
from typing_extensions import sentinel

T_Attr = TypeVar("T_Attr")
T_Default = TypeVar("T_Default")
undefined = object()
undefined = sentinel("undefined")


def typed_attribute() -> Any:
Expand Down
5 changes: 4 additions & 1 deletion src/anyio/itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@
from ._core._tasks import CancelScope
from .lowlevel import cancel_shielded_checkpoint, checkpoint, checkpoint_if_cancelled

if sys.version_info < (3, 15):
from typing_extensions import sentinel

T = TypeVar("T")
R = TypeVar("R")
_tee_end = object()
_tee_end = sentinel("_tee_end")


@dataclass(eq=False)
Expand Down
Loading