vatsrahul1001 opened a new pull request, #77767: URL: https://github.com/apache/airflow/pull/77767
* Fix dag.test() failing for task ids with non-ASCII characters A task id like "Købsmoms" passes task id validation, but dag.test() failed as soon as such a task pushed an XCom. In-process execution sends requests through httpx.WSGITransport, which puts the decoded URL path into PATH_INFO as a plain str. a2wsgi follows PEP 3333 and expects UTF-8 bytes decoded as latin-1, so any non-ASCII character in the path raised UnicodeDecodeError or UnicodeEncodeError and the task failed. Requests over a real HTTP connection are not affected. * Use httpx2 in the non-ASCII in-process transport tests The in-process Execution API transport now uses httpx2, and test_app.py no longer imports httpx after main was merged in. * Refer to httpx2 in the in-process path middleware docstring The in-process transport moved from httpx to httpx2. --------- Co-authored-by: Per Andersen <[email protected]> (cherry picked from commit f97e74a252790f571923bf4cb38ef727ea0cb949) Co-authored-by: Per Andersen <[email protected]> --- The automatic backport failed on a conflict in `airflow-core/src/airflow/api_fastapi/execution_api/in_process.py`, so this was cherry-picked manually (`-x`). The test file applied cleanly. **Conflict resolution (one hunk):** kept the `PEP3333PathMiddleware` subclass as added by the PR, and wrapped `self.app` directly: `middleware = PEP3333PathMiddleware(self.app, loop=loop)`. `main` wraps the app in `_RequestScopedServerContextApp`, which comes from a `main`-only change that is not on `v3-4-test`, so that wrapper and its `cast` comment are dropped. **Verified locally:** `execution_api/test_app.py`: 39 passed, including the 4 new non-ASCII path tests (run against this branch's sources). Backport of #74472. Generated-by: Claude Code 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
