Skip to content

Commit

Permalink
Fixed compatibility with Starlette 0.28+
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jan 8, 2024
1 parent 484f4f3 commit a9aca1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/versionhistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Version history

This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.

**UNRELEASED**

- Fixed Starlette/FastAPI request resource being added under the wrong type since
Starlette v0.28.0

**1.3.0**

- Dropped Python 3.7 support
Expand Down
2 changes: 1 addition & 1 deletion src/asphalt/web/starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
await super().__call__(scope, receive, send)

async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -> Response:
current_context().add_resource(request)
current_context().add_resource(request, types=[Request])
return await call_next(request)


Expand Down

0 comments on commit a9aca1f

Please sign in to comment.