-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
The current version of OpenAPI Generator (v7.17.0) has a bug where generating Python clients
with library=httpx produces incorrect dependencies in pyproject.toml.
Current Behavior
When generating the Python SDK with httpx library:
- ✅
setup.pycorrectly lists:"httpx >= 0.28.1" - ✅
requirements.txtcorrectly lists:httpx = ">= 0.28.1" - ❌
pyproject.tomlincorrectly lists:"aiohttp (>=3.8.4)"and"aiohttp-retry (>=2.8.3)"
This causes issues when installing with modern package managers (like uv, poetry) that use
pyproject.toml as the source of truth.
Root Cause
The pyproject.toml template in OpenAPI Generator v7.17.0 was not properly updated for the
httpx library option, causing it to generate dependencies for aiohttp instead.
Fix
This was fixed in [OpenAPITools/openapi-generator#22289](https://github.com/OpenAPITools/openapi
-generator/pull/22289), merged on November 6, 2025, and will be included in v7.18.0.
Action Required
Once OpenAPI Generator v7.18.0 is released:
- Update the generator version in
openapi/python.sh:OPENAPI_GENERATOR_COMMIT="${OPENAPI_GENERATOR_COMMIT:-v7.18.0}" - Regenerate the Python SDK to get the corrected pyproject.toml
- Remove the manual fix currently applied to kubernetes/pyproject.toml and
kubernetes/test-requirements.txt
Temporary Workaround
The following files have been manually updated as a temporary fix:
- kubernetes/pyproject.toml - Changed aiohttp dependencies to httpx
- kubernetes/test-requirements.txt - Added pytest-asyncio for async test support
These manual changes should be reverted after regenerating with v7.18.0.
References
- Upstream PR: [python] Fix pyproject (poetry 2.x) for httpx OpenAPITools/openapi-generator#22289
- Related Issue: [BUG] [Python] Missing new python-httpx template in v7.16.0 OpenAPITools/openapi-generator#22203
- Current generator version: v7.17.0 (see .openapi-generator/VERSION)
- Target version: v7.18.0 (milestone)