-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
Provide common replacement utils / functions many projects will need #65
Comments
Thanks for opening this issue! I'm a bit surprised here because my understanding is that unasync exists specifically so that you don't need functions like But since you know that, what am I missing here? |
I'm imaging a situation where your API takes a callable from the user and you'd like to support both Maybe |
An example where this would be useful in Hip: When given a body that has |
Also |
Right, this is needed when your API accepts both async and sync callables. Even though unasync is only a build dependency, I don't really mind adding utilities like that and making it useful as a runtime dependency too |
Some utility functions I was thinking about:
Could also have
azip_longest
->zip_longest
, etc.All of the
async
functions could be available only on Python 3.6+ so this could be used on projects that support 3.5 or less.Could also provide type hints that are effected by
unasync
properly as well.This should probably be a separate project to unasync as unasync is primarily a build tool, raising it here because it'd make sense for the tool to live under
python-trio
, maybeunasync-utils
?The text was updated successfully, but these errors were encountered: