Feature or enhancement
Proposal:
This renaming was proposed on Discourse as a solution for the annoyance that two very similar names exist and both can be used in the same statement without any error, because both are async context managers (CM):
async with asyncio.timeout(99): await ... # timeout is using relative time as expected
async with asyncio.Timeout(99): await ... # Timeout is using loop clock absolute time;
# small values are already in the past,
# so it cancels immediately
It is very easy to make an error and write the upper-case Timeout by mistake. For instance we already have the upper-case TaskGroup async CM.
Using timeout creates a Timeout object. Because Timeout is not intended to be used directly, giving it a new name and deprecating the old one was suggested in the linked Discourse thread.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/error-prone-naming-asyncio-timeout-vs-asyncio-timeout/104727
Feature or enhancement
Proposal:
This renaming was proposed on Discourse as a solution for the annoyance that two very similar names exist and both can be used in the same statement without any error, because both are async context managers (CM):
It is very easy to make an error and write the upper-case
Timeoutby mistake. For instance we already have the upper-caseTaskGroupasync CM.Using
timeoutcreates aTimeoutobject. BecauseTimeoutis not intended to be used directly, giving it a new name and deprecating the old one was suggested in the linked Discourse thread.Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/error-prone-naming-asyncio-timeout-vs-asyncio-timeout/104727