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

bpo-30241: implement contextlib.AbstractAsyncContextManager#1412

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
1st1 merged 6 commits intopython:masterfromJelleZijlstra:aacm
Dec 14, 2017

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstraJelleZijlstra commentedMay 3, 2017
edited by bedevere-bot
Loading

@mention-bot
Copy link

@JelleZijlstra, thanks for your PR! By analyzing the history of the files in this pull request, we identified@ncoghlan,@birkenfeld and@rhettinger to be potential reviewers.

def__subclasshook__(cls,C):
ifclsisAbstractAsyncContextManager:
if (any("__aenter__"inB.__dict__forBinC.__mro__)and
any("__aexit__"inB.__dict__forBinC.__mro__)):
Copy link
Member

Choose a reason for hiding this comment

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

I understand you just copied this from above, but I think both should be updated to support the explicit "anti-registration"__enter__ = None pattern, like all classes incollections.abc, see_check_methods function in_collections_abc.py.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Maybe that should be a separate issue?AbstractContextManager should arguably be fixed even in 3.6, and this PR only targets 3.7. I can fixAbstractAsyncContextManager though.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, a separate PR for 3.6 is needed. But I think it makes sense to already fix the async version here.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@gvanrossum
Copy link
Member

Wait, isn't this a new feature that should go into 3.7?

@ilevkivskyi
Copy link
Member

Wait, isn't this a new feature that should go into 3.7?

Oh yes, sorry, this one is not urgent then.

JelleZijlstra added a commit to JelleZijlstra/typeshed that referenced this pull requestJun 24, 2017
Implements:-python/typing#438-python/cpython#360python/cpython#1412, which addscontextlib.AbstractAsyncContextManager, has not yet been merged.
gvanrossum pushed a commit to python/typeshed that referenced this pull requestJun 27, 2017
)Implements:-python/typing#438-python/cpython#360Note thatpython/cpython#1412, which addscontextlib.AbstractAsyncContextManager, has not yet been merged.
@1st1
Copy link
Member

Please add a NEWS entry and I'll merge this in.

@JelleZijlstra
Copy link
MemberAuthor

Thanks, just pushed a NEWS entry.


..class::AbstractAsyncContextManager

An:term:`abstract base class` similar to
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we could just copy the paragraph fromAbstractContextManager doc. "similar to" isn't easy to read here.

@Kentzo
Copy link
Contributor

Kentzo commentedDec 11, 2017
edited
Loading

The PR#4790 addsAsyncExitStack subclass. It should inherit fromAbstractAsyncContextManager.

@ilevkivskyi
Copy link
Member

@JelleZijlstra Could you please fix the merge conflict and update the docs as@1st1 proposed? I would like to have this merged soon.

@1st1
Copy link
Member

Thanks@JelleZijlstra!

@JelleZijlstraJelleZijlstra deleted the aacm branchDecember 14, 2017 01:28
@JelleZijlstra
Copy link
MemberAuthor

Thanks, and sorry for dropping the ball on making the docs change!

@1st1
Copy link
Member

NP ;)

@ilevkivskyi
Copy link
Member

Thank you@JelleZijlstra and@1st1 !

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@1st11st11st1 approved these changes

@ilevkivskyiilevkivskyiilevkivskyi 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.

8 participants

@JelleZijlstra@mention-bot@gvanrossum@ilevkivskyi@1st1@Kentzo@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp