Async support? · gitpython-developers/GitPython · Discussion #1330
Repository navigation
Async support? #1330
znd4 started this conversation in Ideas Async support? #1330 znd4 Aug 25, 2021 · 2 comments · 2 replies Return to top Discussion optionsznd4 Aug 25, 2021
|
I have no idea how much work would be required to implement this, but it'd be awesome to be able to await Repo.clone_from(url, path) (or something similar -- it's not the end of the world if it has to be a separate method): await Repo.async_clone_from(url, path) I just read the blurb about the status of this project, so totally get that this would only be unlikely to be implemented without an enterprising contributor. I googled my way to asyncio.create_subprocess_exec , so it's definitely possible , but it seems like it'd be a ton of work to maintain async and non-async interfaces for everything, so I could understand if you'd rather not accept this as a contribution |
Replies: 2 comments 2 replies
Comment options
Byron
Aug 26, 2021
Maintainer
Thanks for bringing this up - there is no doubt a use for this in async codebases, but the cost of maintaining that seems too high even with such an enterprising contributor. If there is some potential in this regard, are there ways in python to 'asyncify` otherwise blocking code to make it flow better in async code bases or make it more composable? If so, this might be wroth a contribution to the documentation along the lines of 'GitPython and async'. |
ahonnecke Apr 26, 2022
@Byron Can you elaborate on that? This seems like an ideal library for async as it's very io bound and synchronous functions can call async functions, so (as I understand it) it wouldn't be a matter of maintaining both, just porting all the io to async calls. |
This discussion was converted from issue #1329 on August 26, 2021 01:11.