shahar1 commented on code in PR #65587:
URL: https://github.com/apache/airflow/pull/65587#discussion_r4501318233


##########
airflow-core/src/airflow/api_fastapi/execution_api/in_process.py:
##########
@@ -131,7 +149,8 @@ def transport(self) -> httpx2.WSGITransport:
         thread = threading.Thread(target=loop.run_forever, 
name="InProcessExecutionAPI-loop", daemon=True)
         thread.start()
 
-        middleware = ASGIMiddleware(self.app, loop=loop)
+        app = self.app
+        middleware = ASGIMiddleware(cast("Any", 
_RequestScopedServerContextApp(app)), loop=loop)

Review Comment:
   **nit:** `cast("Any", ...)` brings back the `Any` that the earlier typing 
thread removed. If a2wsgi's `ASGIApp` protocol just doesn't match Starlette's 
`Scope`/`Receive`/`Send` types, a narrower cast to a2wsgi's own type, or a 
one-line comment saying so, would keep the type checker useful here. Not 
blocking.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to