From 2123daaf29981cd095d0d11b37303da3b2ffcf85 Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Sun, 23 Mar 2025 16:44:16 -0400 Subject: [PATCH 1/2] Add intersphinx links for 3.13 typing features --- doc/index.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index bf8b431a..79ec16b6 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -255,7 +255,7 @@ Special typing primitives .. data:: NoDefault - See :py:class:`typing.NoDefault`. In ``typing`` since 3.13.0. + See :py:data:`typing.NoDefault`. In ``typing`` since 3.13. .. versionadded:: 4.12.0 @@ -341,7 +341,9 @@ Special typing primitives .. data:: ReadOnly - See :pep:`705`. Indicates that a :class:`TypedDict` item may not be modified. + See :py:data:`typing.ReadOnly` and :pep:`705`. In ``typing`` since 3.13. + + Indicates that a :class:`TypedDict` item may not be modified. .. versionadded:: 4.9.0 @@ -379,8 +381,9 @@ Special typing primitives .. data:: TypeIs - See :pep:`742`. Similar to :data:`TypeGuard`, but allows more type narrowing. - In ``typing`` since 3.13. + See :py:data:`typing.TypeIs` and :pep:`742`. In ``typing`` since 3.13. + + Similar to :data:`TypeGuard`, but allows more type narrowing. .. versionadded:: 4.10.0 @@ -878,6 +881,8 @@ Functions .. function:: is_protocol(tp) + See :py:func:`typing.is_protocol`. In ``typing`` since 3.13. + Determine if a type is a :class:`Protocol`. This works with protocols defined using either :py:class:`typing.Protocol` or :class:`typing_extensions.Protocol`. From e0d2b8aaba51c154e1cde7abf6ba1c0f8ee6489a Mon Sep 17 00:00:00 2001 From: Brian Schubert Date: Sun, 23 Mar 2025 16:57:42 -0400 Subject: [PATCH 2/2] Add link for get_protocol_members --- doc/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/index.rst b/doc/index.rst index 79ec16b6..2c1a149c 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -846,6 +846,8 @@ Functions .. function:: get_protocol_members(tp) + See :py:func:`typing.get_protocol_members`. In ``typing`` since 3.13. + Return the set of members defined in a :class:`Protocol`. This works with protocols defined using either :class:`typing.Protocol` or :class:`typing_extensions.Protocol`.