Skip to content

Comments

Add _core module with shared sync/async client using iter_coroutine#42

Draft
scotttrinh wants to merge 1 commit intomainfrom
iter-coroutine
Draft

Add _core module with shared sync/async client using iter_coroutine#42
scotttrinh wants to merge 1 commit intomainfrom
iter-coroutine

Conversation

@scotttrinh
Copy link
Collaborator

This is not the final form (we want pydantic models, etc), but this is the POC for using the iter_coroutine approach we discussed. How does this feel?

@scotttrinh scotttrinh requested a review from 1st1 February 2, 2026 19:53
@vercel
Copy link

vercel bot commented Feb 2, 2026

@scotttrinh must be a member of the Framework Test Matrix team on Vercel to deploy.
- Click here to add @scotttrinh to the team.
- If you initiated this build, request access.

Learn more about collaboration on Vercel and other options here.

@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedrespx@​0.22.0100100100100100

View full report

) -> httpx.Response: ...

@abc.abstractmethod
async def close(self) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) -> httpx.Response: ...
) -> httpx.Response: ...
raise NotImplementedError

self.close()


class AsyncVercelClient:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class AsyncVercelClient:
class AsyncIOVercelClient:

and we also need to add a TrioVercelClient

Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants