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

Consider dropping Twirpy middlewares #42

Open
ofpiyush opened this issue May 22, 2022 · 1 comment
Open

Consider dropping Twirpy middlewares #42

ofpiyush opened this issue May 22, 2022 · 1 comment

Comments

@ofpiyush
Copy link
Contributor

One can use middlewares from https://www.starlette.io/middleware/

Our middlewares act more like a decorator on the actual method than a real middleware. I believe we had added them internally when we didn't have hooks, but I can't remember for sure.

To avoid confusion with Starlette's middlewares, we can drop them from a future version.

As for immediate next step, maybe we can deprecate them in the next version and wait for users to tell us if they're using it?

If no one shows up for the next 2 versions, we can drop support?

@jacobe
Copy link

jacobe commented Aug 18, 2022

Good idea. It's confusing and also undocumented, so I had to reverse engineer how to add middlewares to an instance of TwirpASGIApp when the Starlette-compatible middlwares didn't work.

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