Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-118647: Add defaults to typing.Generator and typing.AsyncGenerator#118648

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JelleZijlstra merged 4 commits intopython:mainfromJelleZijlstra:gendef
May 6, 2024

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstraJelleZijlstra commentedMay 6, 2024
edited by github-actionsbot
Loading

bluetech reacted with hooray emoji
@Daverball
Copy link

It might be worth considering also updatingContextManager andAsyncContextManager to match what I did inpython/typeshed#11048 forAbstractContextManager andAbstractAsyncContextManager, now that you've laid the necessary groundwork for defaults in_SpecialGenericAlias.

But we can also save it for a follow-up PR, if you'd prefer that. A change in typeshed doesn't make sense until we test 3.13 to the CI.

@JelleZijlstraJelleZijlstra marked this pull request as ready for reviewMay 6, 2024 16:55
@JelleZijlstra
Copy link
MemberAuthor

@Daverball Possibly, but note that we're one day away from the feature freeze for Python 3.13. I can spend some time on it later today, but please open a separate issue first.

@AlexWaygood if you have time, could you review this PR that just adds defaults for Generator and AsyncGenerator?

Daverball reacted with thumbs up emoji

@graingert
Copy link
Contributor

typing.Generator andtyping.AsyncGenerator are deprecated, why are they getting new features?

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@mikeshardmind
Copy link
Contributor

mikeshardmind commentedMay 6, 2024
edited
Loading

typing.Generator andtyping.AsyncGenerator are deprecated, why are they getting new features?

I would hope this isn't a real blocker here. From a user standpoint, users are toldcollections.abc variants are meant to behave identically. (they are actually documented as a deprecatedalias and not as a separate object)

Deprecated alias tocollections.abc.Generator.

(https://docs.python.org/3/library/typing.html#typing.Generator)

If this deprecation results in them not being equivalent anymore, you've broken the documented idea of them being equivalent.

Gobot1234, Daverball, and hauntsaninja reacted with thumbs up emoji

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@JelleZijlstraJelleZijlstraenabled auto-merge (squash)May 6, 2024 22:04
@JelleZijlstraJelleZijlstra merged commit8419f01 intopython:mainMay 6, 2024
@JelleZijlstraJelleZijlstra deleted the gendef branchMay 6, 2024 23:15
SonicField pushed a commit to SonicField/cpython that referenced this pull requestMay 8, 2024
…erator (python#118648)Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sobolevnsobolevnsobolevn approved these changes

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@JelleZijlstra@Daverball@graingert@mikeshardmind@sobolevn@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp