From 036fbca18a4833d7172d89a4b4b5fd3b2a1cfadf Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 24 Oct 2026 12:55:15 -0700 Subject: [PATCH 1/2] Indicate that the (lenient) mypy patch is up-to-date --- peps/pep-0718.rst | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/peps/pep-0718.rst b/peps/pep-0718.rst index dc2afe53947..a7505983aa5 100644 --- a/peps/pep-0718.rst +++ b/peps/pep-0718.rst @@ -839,22 +839,19 @@ Reference Implementation branch. It predates ``types.FunctionGenericAlias`` (it returns a plain ``types.GenericAlias``) and does not yet cover ``MethodWrapperType``. * `python/mypy#21880 `__: a type checker - prototype of the behaviour specified here, behind - ``--enable-incomplete-feature=SubscriptableFunctions``. It confirmed that - ``ParamSpec``, ``TypeVarTuple`` and type parameter defaults can follow the rules for - generic classes by reusing the same code, and implements the overload filtering - described above. + prototype behind ``--enable-incomplete-feature=SubscriptableFunctions``. + It implements function subscription, including overload filtering, method + binding, type parameter defaults, ``ParamSpec`` and ``TypeVarTuple`` support, + and the Python 3.16 version check. * `python/mypy#21881 `__: a variant of the prototype that only allows subscripting callables traceable to a ``def`` (see `Rejected Ideas`_). It cannot be fully sound either, since type checkers have to assume that decorators preserve the kind of object they wrap. -The following rules are not yet implemented in either prototype: reporting unsolvable -type parameters at the call instead of the definition, not reporting overloads that -differ only in type parameter bounds as overlapping, the consistency rule for overload -implementations, the Python version check, and keeping return-only type parameters -through ``ParamSpec`` decorators (mypy currently solves them to ``Never``, so a -``contextmanager`` function like ``session`` above cannot be subscripted). +The prototypes are experimental. The mypy prototype in ``python/mypy#21880`` +has been updated to address the typing rules specified here, with regression +tests. The stricter variant in ``python/mypy#21881`` has not received these +updates. The cpython prototype has not yet been updated. Rejected Ideas -------------- From 255fefc8d29f6a60f9d5fde84d30151e9375d273 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 24 Oct 2026 15:54:48 -0700 Subject: [PATCH 2/2] Link directly to PRs in note about experimental status --- peps/pep-0718.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/peps/pep-0718.rst b/peps/pep-0718.rst index a7505983aa5..7a8bffccbab 100644 --- a/peps/pep-0718.rst +++ b/peps/pep-0718.rst @@ -848,10 +848,12 @@ Reference Implementation `Rejected Ideas`_). It cannot be fully sound either, since type checkers have to assume that decorators preserve the kind of object they wrap. -The prototypes are experimental. The mypy prototype in ``python/mypy#21880`` +The prototypes are experimental. The mypy prototype in +`python/mypy#21880 `__ has been updated to address the typing rules specified here, with regression -tests. The stricter variant in ``python/mypy#21881`` has not received these -updates. The cpython prototype has not yet been updated. +tests. The stricter variant in +`python/mypy#21881 `__ +has not received these updates. The cpython prototype has not yet been updated. Rejected Ideas --------------