Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-91491: What's New in 3.11 section for typing PEPs #91721

Merged
merged 4 commits into from
Apr 24, 2022

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Apr 20, 2022

Other aspects of typing aren't covered yet; I'll do that in a
separate PR.

#91491

Other aspects of typing aren't covered yet; I'll do that in a
separate PR.
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting core review labels Apr 20, 2022
@JelleZijlstra
Copy link
Member Author

cc PEP authors @davidfstr @mrahtz @pradeep90 @Gobot1234

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

This LGTM but I'm not an expert authority on the PEPs listed. So I'm waiting for them to give their reviews.

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@Gobot1234 Gobot1234 left a comment

Choose a reason for hiding this comment

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

The Self section looks good, thanks Jelle.

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

A few nits, but on the whole this looks great!

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@davidfstr davidfstr left a comment

Choose a reason for hiding this comment

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

Added some wordsmithing comments. Thanks for drafting @JelleZijlstra !

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
@JelleZijlstra
Copy link
Member Author

Thanks everyone for the feedback! I pushed a commit addressing most requests and adding some links.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

Doc/whatsnew/3.11.rst Show resolved Hide resolved
Copy link
Contributor

@pradeep90 pradeep90 left a comment

Choose a reason for hiding this comment

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

LGTM

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
def __enter__(self) -> Self:
self.lock()
return self

Copy link
Contributor

Choose a reason for hiding this comment

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

One important use case is that calling this method on a subclass object will return the subclass type, not this class type. e.g.,

class ChildLock(MyLock): ...

ChildLock().__enter__()  # type is `ChildLock`, not `MyLock`.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think that should be mentioned here? It's meant to be a brief summary after all.

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
@mrahtz
Copy link
Contributor

mrahtz commented Apr 21, 2022

LGTM. Thanks, Jelle!

Co-authored-by: Pradeep Kumar <gohanpra@gmail.com>
@JelleZijlstra JelleZijlstra merged commit dd3cf12 into python:main Apr 24, 2022
@JelleZijlstra JelleZijlstra deleted the typingwhatsnew branch April 24, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants