-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
feat(core): new base middleware [RFC] #3996
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3996 +/- ##
==========================================
- Coverage 98.35% 98.29% -0.06%
==========================================
Files 347 347
Lines 15783 15800 +17
Branches 1745 1746 +1
==========================================
+ Hits 15523 15531 +8
- Misses 124 133 +9
Partials 136 136 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
maybe add an example of transition from previous to new implementation ?
Yeah, I want to expand the docs in general a bit |
Co-authored-by: euri10 <[email protected]>
ce365c3
to
1fd036d
Compare
|
Add a new base middleware class to facilitate easier configuration and middleware dispatching.
The new
ASGIMiddleware
features the same functionality as theAbstractMiddleware
, but makes it easier to pass configuration directly to middleware classes without a separate configuration object, allowing to get rid of theDefineMiddleware
pattern entirely.If we are to add this, I propose we do so in v2, and migrate existing middlewares to this pattern in v3.