Skip to content

Commit d277746

Browse files
authored
docs: add version compatibility table (#733)
Add a table listing typing_extensions objects that backport or extend features from the standard library, showing: - Python version when the feature was added to typing - typing_extensions release that first included it - Associated PEP (if any)
1 parent 01bd34f commit d277746

1 file changed

Lines changed: 177 additions & 0 deletions

File tree

doc/index.rst

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,183 @@ Python version support
147147
support for older Python versions will be dropped some time after that version
148148
reaches end of life.
149149

150+
Version compatibility table
151+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
152+
153+
The following table lists objects provided by ``typing_extensions`` that
154+
backport or extend features from the standard library, along with the
155+
Python version in which each feature was added to :py:mod:`typing` and the
156+
``typing_extensions`` release that first included it.
157+
158+
.. list-table::
159+
:header-rows: 1
160+
:widths: 25 15 20 15
161+
162+
* - Object
163+
- In :mod:`typing` (Python)
164+
- In ``typing_extensions``
165+
- PEP
166+
* - :data:`Annotated`
167+
- 3.9
168+
- 3.7.4
169+
- :pep:`593`
170+
* - :data:`Any` (as base class)
171+
- 3.11
172+
- 4.4.0
173+
-
174+
* - :class:`Buffer`
175+
- 3.12
176+
- 4.6.0
177+
- :pep:`688`
178+
* - :class:`CapsuleType`
179+
- 3.13
180+
- 4.12.0
181+
-
182+
* - :data:`Concatenate`
183+
- 3.10
184+
- 3.7.4
185+
- :pep:`612`
186+
* - :func:`dataclass_transform`
187+
- 3.11
188+
- 4.1.0
189+
- :pep:`681`
190+
* - :func:`deprecated`
191+
- 3.13
192+
- 4.5.0
193+
- :pep:`702`
194+
* - :func:`disjoint_base`
195+
-
196+
- 4.15.0
197+
- :pep:`800`
198+
* - :func:`evaluate_forward_ref`
199+
- 3.14
200+
- 4.13.0
201+
-
202+
* - :class:`Format`
203+
-
204+
- 4.13.0
205+
- :pep:`649`
206+
* - :func:`get_annotations`
207+
- 3.10
208+
- 4.13.0
209+
- :pep:`649`
210+
* - :func:`get_original_bases`
211+
- 3.12
212+
- 4.6.0
213+
-
214+
* - :func:`get_protocol_members`
215+
- 3.13
216+
- 4.7.0
217+
-
218+
* - :data:`Literal`
219+
- 3.8
220+
- 2.4.0
221+
- :pep:`586`
222+
* - :data:`LiteralString`
223+
- 3.11
224+
- 4.1.0
225+
- :pep:`675`
226+
* - :class:`NamedTuple` (generic)
227+
- 3.11
228+
- 4.3.0
229+
-
230+
* - :data:`Never`
231+
- 3.11
232+
- 4.1.0
233+
-
234+
* - :class:`NewType` (picklable)
235+
- 3.10
236+
- 4.6.0
237+
-
238+
* - :data:`NoDefault`
239+
- 3.13
240+
- 4.12.0
241+
- :pep:`696`
242+
* - :data:`NoExtraItems`
243+
- 3.15
244+
- 4.13.0
245+
- :pep:`728`
246+
* - :data:`NotRequired`
247+
- 3.11
248+
- 4.0.0
249+
- :pep:`655`
250+
* - :class:`ParamSpec`
251+
- 3.10
252+
- 3.7.4
253+
- :pep:`612`
254+
* - :class:`Protocol`
255+
- 3.8
256+
- 2.4.0
257+
- :pep:`544`
258+
* - :data:`ReadOnly`
259+
- 3.13
260+
- 4.9.0
261+
- :pep:`705`
262+
* - :data:`Required`
263+
- 3.11
264+
- 4.0.0
265+
- :pep:`655`
266+
* - :data:`Self`
267+
- 3.11
268+
- 4.0.0
269+
- :pep:`673`
270+
* - :class:`Sentinel`
271+
- 3.14
272+
- 4.14.0
273+
- :pep:`661`
274+
* - :class:`TypeAliasType`
275+
- 3.12
276+
- 4.6.0
277+
- :pep:`695`
278+
* - :data:`TypeForm`
279+
-
280+
- 4.13.0
281+
- :pep:`747`
282+
* - :data:`TypeGuard`
283+
- 3.10
284+
- 3.10
285+
- :pep:`647`
286+
* - :data:`TypeIs`
287+
- 3.13
288+
- 4.10.0
289+
- :pep:`742`
290+
* - :class:`TypeVar` (``default``/``infer_variance``)
291+
- 3.12/3.13
292+
- 4.4.0
293+
- :pep:`695`, :pep:`696`
294+
* - :class:`TypeVarTuple`
295+
- 3.11
296+
- 4.1.0
297+
- :pep:`646`
298+
* - :func:`assert_never`
299+
- 3.11
300+
- 4.1.0
301+
-
302+
* - :func:`assert_type`
303+
- 3.11
304+
- 4.2.0
305+
-
306+
* - :func:`get_overloads`
307+
- 3.11
308+
- 4.2.0
309+
-
310+
* - :func:`is_protocol`
311+
- 3.13
312+
- 4.7.0
313+
-
314+
* - :func:`is_typeddict`
315+
- 3.10
316+
- 4.1.0
317+
-
318+
* - :func:`reveal_type`
319+
- 3.11
320+
- 4.1.0
321+
-
322+
* - :func:`type_repr`
323+
- 3.14
324+
- 4.15.0
325+
-
326+
150327
Module contents
151328
---------------
152329

0 commit comments

Comments
 (0)