| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -260,6 +260,9 @@ Standard names are defined for the following types: | |||
| 260 | 260 | ||
| 261 | 261 | .. versionadded:: 3.9 | |
| 262 | 262 | ||
| 263 | + .. versionchanged:: 3.9.2 | ||
| 264 | + This type can now be subclassed. | ||
| 265 | + | ||
| 263 | 266 | ||
| 264 | 267 | .. class:: TracebackType(tb_next, tb_frame, tb_lasti, tb_lineno) | |
| 265 | 268 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1497,3 +1497,22 @@ functions and options conditionally available based on the operating system | |||
| 1497 | 1497 | version in use at runtime ("weaklinking"). | |
| 1498 | 1498 | ||
| 1499 | 1499 | (Contributed by Ronald Oussoren and Lawrence D'Anna in :issue:`41100`.) | |
| 1500 | + | ||
| 1501 | + Notable changes in Python 3.9.2 | ||
| 1502 | + =============================== | ||
| 1503 | + | ||
| 1504 | + collections.abc | ||
| 1505 | + --------------- | ||
| 1506 | + | ||
| 1507 | + :class:`collections.abc.Callable` generic now flattens type parameters, similar | ||
| 1508 | + to what :data:`typing.Callable` currently does. This means that | ||
| 1509 | + ``collections.abc.Callable[[int, str], str]`` will have ``__args__`` of | ||
| 1510 | + ``(int, str, str)``; previously this was ``([int, str], str)``. To allow this | ||
| 1511 | + change, :class:`types.GenericAlias` can now be subclassed, and a subclass will | ||
| 1512 | + be returned when subscripting the :class:`collections.abc.Callable` type. | ||
| 1513 | + Code which accesses the arguments via :func:`typing.get_args` or ``__args__`` | ||
| 1514 | + need to account for this change. A :exc:`DeprecationWarning` may be emitted for | ||
| 1515 | + invalid forms of parameterizing :class:`collections.abc.Callable` which may have | ||
| 1516 | + passed silently in Python 3.9.1. This :exc:`DeprecationWarning` will | ||
| 1517 | + become a :exc:`TypeError` in Python 3.10. | ||
| 1518 | + (Contributed by Ken Jin in :issue:`42195`.) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments