-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
bpo-36921: Deprecate @coroutine for sake of async def #13346
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
| @asyncio.coroutine | ||
| def __anext__(self) -> T_a: | ||
| data = yield from self.value | ||
| async def __anext__(self) -> T_a: |
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.
The same functionality but without @coroutine
ilevkivskyi
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.
The typing part LGTM.
Co-Authored-By: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
want to update |
|
Also side-question (and maybe this is better suited for bpo , should Because presumably once I'm thinking they are still useful from inter-library compatibility and across python version; so maybe deprecate as well but remove even later ? |
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.
Overall LGTM. Please fix the few nits I commented on.
We can deprecate them when we remove |
Co-Authored-By: Yury Selivanov <yury@magic.io>
Co-Authored-By: Yury Selivanov <yury@magic.io>
|
@caavery the funny thing that |
| This decorator should not be used for :keyword:`async def` | ||
| coroutines. | ||
|
|
||
| .. deprecated-removed:: 3.8 3.10 |
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.
Replace free-form deprecation text with more standardized one.
|
The last call for a review. |
I think it's ready. |
The second attempt. Now deprecate
@coroutineonly, keepyield from futas is.https://bugs.python.org/issue36921