-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-40816 Add AsyncContextDecorator class #20516
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
Conversation
eamanu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, we need test here, docs.. I thing this need more discussion?
|
Do you know you can write something like And use it as but you can't write because you get the error |
|
@heckad since core review attention is a scarce resource, I suggest having the PR ready to approve. Since the tests and docs can mostly be copied from ContextDecorator, not too much work? This functionality is needed-- let's assume the maintainers will agree. |
|
@belm0 How to improve the documentation? |
See context manager docs:
(it would also need "Changed in version X.X" annotation) Also see the ContextDecorator docs. Perhaps it's enough to say "Similar to ContextDecorator(), but works with async context managers" and give a short example. https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager |
1st1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait! The code/tests look great! But we also need to update the docs before we merge this.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
Need to add a version. Which version of python will be added this feature? |
3.10. |
What about 3.9? |
|
We missed that train, unfortunately. 3.9 is frozen for new features. |
Co-authored-by: Yury Selivanov <[email protected]>
|
@1st1, all changes were applied. |
|
Thanks @heckad |
https://bugs.python.org/issue40816