Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove duplicate mention of override, add two others
  • Loading branch information
JelleZijlstra committed May 26, 2023
commit 0c8dfb15a96ebe766058201b62e35fb079ea4165
12 changes: 7 additions & 5 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,6 @@ tempfile
typing
------

* Add :func:`typing.override`, an override decorator telling to static type
checkers to verify that a method overrides some method or attribute of the
same name on a base class, as per :pep:`698`. (Contributed by Steven Troxler in
:gh:`101564`.)

* :func:`isinstance` checks against
:func:`runtime-checkable protocols <typing.runtime_checkable>` now use
:func:`inspect.getattr_static` rather than :func:`hasattr` to lookup whether
Expand Down Expand Up @@ -783,6 +778,13 @@ typing
or more members may be slower than in Python 3.11. (Contributed by Alex
Waygood in :gh:`74690` and :gh:`103193`.)

* All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have the
``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco in
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this attribute is undocumented (and I'd prefer it to stay that way, though that's not a strong opinion), could we add this something like "this ensures that types.get_original_bases(typeddict_class) will now always return the correct result"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could say "now work reliably with :func:types.get_original_bases", although that's a bit of a vacuous statement as types.get_original_bases didn't exist before 3.12 :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, I guess you're right, it's probably fine as it is

:gh:`103699`.)

* Add ``frozen_default`` parameter to :func:`typing.dataclass_transform`.
(Contributed by Erik De Bonte in :gh:`99957`.)

sys
---

Expand Down