Skip to content
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

ASGIWrapper: make sync_spawn and call_soon optional #188

Closed
virajkanwade opened this issue Feb 10, 2024 · 4 comments
Closed

ASGIWrapper: make sync_spawn and call_soon optional #188

virajkanwade opened this issue Feb 10, 2024 · 4 comments

Comments

@virajkanwade
Copy link

virajkanwade commented Feb 10, 2024

sync_spawn: Callable,

Most asgi middlewares implement __call__ with only 3 params, scope, receive and send.

        sync_spawn: Callable,
        call_soon: Callable,

These are anyways not being used. So making them optional might make it simpler for integration.

        sync_spawn: Callable | None = None,
        call_soon: Callable | None = None,
@virajkanwade
Copy link
Author

virajkanwade commented Mar 15, 2024

@pgjones thoughts? Thanks

getappmap/appmap-python#251 (comment)

@pgjones
Copy link
Owner

pgjones commented May 26, 2024

ASGIWrapper is not meant to be used as middleware, you can use normal ASGI middleware with Hypercorn though by wrapping the app with it. Is there something about ASGIWrapper you specifically want to use?

@virajkanwade
Copy link
Author

@pgjones we were trying to integrate Hypercorn in appmap. getappmap/appmap-python#251 (comment)

But they decided to support only uvicorn. So you can close this if you want to.

@pgjones
Copy link
Owner

pgjones commented May 27, 2024

Ok, for clarity ASGIWrapper is meant for Hypercorn's internal usage. The same ASGI middleware that works with Uvicorn will work with Hypercorn.

@pgjones pgjones closed this as completed May 27, 2024
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

No branches or pull requests

2 participants