Closed deedy5 closed 9 months ago
Problem with checks:
Build, test and release / Build bdist wheels and test (ubuntu-22.04) Build, test and release / Build bdist wheels and test (macos-12) Build, test and release / Build bdist wheels and test (macos-14) Build, test and release / Build bdist wheels and test (windows-2019)
These checks cannot be completed and are canceled after 6 hours.
@yifeikong
Hi @deedy5, have you finished your PR?
@yifeikong yes
@yifeikong Hi. Can you release a new beta version with this change?
I'll be releasing 0.6 soon, probably tomorrow.
0.6.0 was released.
The nest_asyncio
trick will also need to be applied to other people's code 😢, not just the tests, otherwise it will raise errors, see #254. Thus I changed AsyncSession.close
to a coroutine, which seems to be the common way.
A new release(0.6.1) was published to address this issue, you may need to adjust your code accordingly.
Reason:
Sometimes there are messages like this one:
Description:
This PR addresses the issue of warning messages being logged when the AsyncCurl object is closed. Specifically, it resolves the "Task was destroyed but it is pending!" warnings that occur when the _checker task is cancelled.
Changes Made:
Modified close method: added a try/except block to catch and ignore asyncio.CancelledError when cancelling the _checker task. This prevents the warning message from being logged.
These changes ensure that the _checker task is cancelled gracefully, and the cancellation is confirmed before continuing with the cleanup process. This should eliminate the warning messages related to pending tasks during object closure.