@@ -63,9 +63,14 @@ Static type checkers must treat ``TYPE_CHECKING`` as ``True``, similar to
6363:data: `typing.TYPE_CHECKING `.
6464
6565If this PEP is accepted, the new ``TYPE_CHECKING `` constant will be
66- the preferred approach, instead of the existing ``typing.TYPE_CHECKING ``.
67- However, ``typing.TYPE_CHECKING `` will not be deprecated in the foreseeable
68- future.
66+ the preferred approach and importing ``typing.TYPE_CHECKING `` will be
67+ deprecated.
68+ To minimize the runtime impact of typing, this deprecation will generate
69+ ``DeprecationWarning `` no sooner than Python 3.13's end of life, scheduled
70+ for October 2029.
71+
72+ Instead, type checkers may warn about such deprecated usage when the target
73+ version of the checked program is signalled to be Python 3.14 or newer.
6974
7075
7176Backwards Compatibility
@@ -115,6 +120,20 @@ Benefit from eliminating type-checking-only code is estimated to be not enough
115120to justify the complexity.
116121
117122
123+ Optimize ``import typing ``
124+ --------------------------
125+
126+ Future optimizations may eliminate the need to avoid importing the ``typing ``
127+ module for startup time.
128+
129+ Even with such optimizations, there will still be use cases where minimizing
130+ imports is beneficial, such as running Python on embedded systems or
131+ in browsers.
132+
133+ Therefore, defining a constant for skipping type-checking-only code outside
134+ the ``typing `` module remains valuable.
135+
136+
118137Copyright
119138=========
120139
0 commit comments