Skip to content

Commit 4ddd22e

Browse files
committed
docs: add version compatibility table
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) Closes #299
1 parent 442d848 commit 4ddd22e

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

doc/index.rst

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

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

0 commit comments

Comments
 (0)