← Winnitude! Search  ·  Reader Mode (1183 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 17 LINKS

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 options

znd4 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

1 You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

Byron Aug 26, 2021
Maintainer

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

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'.

1 You must be logged in to vote 0 replies Comment options

ahonnecke Apr 26, 2022

the cost of maintaining that seems too high

@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.

1 You must be logged in to vote 2 replies Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment Category Ideas Labels None yet 4 participants Converted from issue

This discussion was converted from issue #1329 on August 26, 2021 01:11.