- Notifications
You must be signed in to change notification settings - Fork5.9k
Open
Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
Thetelegram.File.download_to_drive method is an async coroutine, but it performs synchronous file I/O (.write_bytes,shutil.copyfile).
These blocking calls can stall the asyncio event loop, especially with large files or heavy I/O load. This undermines the non-blocking promise of an async method and can hurt a bot's responsiveness.
Describe the solution you'd like
The method should be made fully asynchronous by replacing all synchronous file operations with non-blocking alternatives from the aiofiles library.
This change would make the entire file download process truly non-blocking.
I am happy to prepare and submit a Pull Request to implement this feature.
Describe alternatives you've considered
No response
Additional context
No response