Replies: 1 comment
-
|
I guess I could subclass |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ok, so, I'm using httpx in swiss-army-upload. Part of this is that I (will) have multiple
httpx.Authimplementations for various backend systems. With such complexity, there's some common flows I'd like to break out, eg the stuff needed to get a real OIDC JWT token when running inside of GitHub Actions.Which is fine, you can just
yield fromand it's pretty easy. Cool. Hardly a trifle.But then I needed to start doing non-HTTP things inside the auth, namely talking to credentials storage (keyring) without blocking the async loop. Cool, fine, wrap it up in async wrappers, switch from
auth_flowtoasync_auth_flow, easy enough.Except that you can't use
yield frominside of async functions.Here's what I can think of:
.send(),StopIteration, etc)for loopand.send())Is there a better way of handling this?
Beta Was this translation helpful? Give feedback.
All reactions