We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
__enter__
expired
True
The change allows to figure out is asyncio.TimeoutError was raised by context manager itself or internal code, e.g.
asyncio.TimeoutError
try: async with timeout(1.0) as cm: await fetch() except asyncio.TimeoutError: if cm.expired: # top level timeout else: # `fetch()` raised timeout itself
@hellysmile we discussed the change offline. Do you agree with proposed API?
The text was updated successfully, but these errors were encountered:
Looks perfect. Another way is just bool(cm), not sure is it clear or nor
bool(cm)
Sorry, something went wrong.
Explicit property is better I believe.
Fixed by #16
No branches or pull requests
__enter__
.expired
property should returnTrue
if timeout expired.The change allows to figure out is
asyncio.TimeoutError
was raised by context manager itself or internal code, e.g.@hellysmile we discussed the change offline.
Do you agree with proposed API?
The text was updated successfully, but these errors were encountered: