Add _core module with shared sync/async client using iter_coroutine#42
Add _core module with shared sync/async client using iter_coroutine#42scotttrinh wants to merge 1 commit intomainfrom
Conversation
|
@scotttrinh must be a member of the Framework Test Matrix team on Vercel to deploy. Learn more about collaboration on Vercel and other options here. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| ) -> httpx.Response: ... | ||
|
|
||
| @abc.abstractmethod | ||
| async def close(self) -> None: ... |
There was a problem hiding this comment.
| async def close(self) -> None: ... | |
| async def close(self) -> None: | |
| raise NotImplementedError |
| json: Any | None = None, | ||
| content: bytes | None = None, | ||
| headers: dict[str, str] | None = None, | ||
| ) -> httpx.Response: ... |
There was a problem hiding this comment.
| ) -> httpx.Response: ... | |
| ) -> httpx.Response: ... | |
| raise NotImplementedError |
| self.close() | ||
|
|
||
|
|
||
| class AsyncVercelClient: |
There was a problem hiding this comment.
| class AsyncVercelClient: | |
| class AsyncIOVercelClient: |
and we also need to add a TrioVercelClient
1st1
left a comment
There was a problem hiding this comment.
Aside from a couple of nits this is exactly where I wanted to go with this. Please push forward. I'd add "trio" support + tests and once we are there, I'd start converting the code + increasing the API coverage with those three targets (asycio, trio, blocking io) in mind.
This is not the final form (we want pydantic models, etc), but this is the POC for using the
iter_coroutineapproach we discussed. How does this feel?