Description
Describe the bug
#1009 introduced an alias=
to the generated attrs field
s. The alias=
support needs attrs version 22.2 or higher. However, openapi-python-client
emits attrs>=21.3.0
. The generated code fails to import against attrs 21.* and 22.1.* due to the missing field(alias=...)
kwarg in those versions.
FWIW, existing attrs dependency declarations include:
$ git grep 'attrs\s*>'
end_to_end_tests/metadata_snapshots/pdm.pyproject.toml: "attrs>=21.3.0",
end_to_end_tests/metadata_snapshots/setup.py: install_requires=["httpx >= 0.20.0, < 0.28.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
integration-tests/pyproject.toml: "attrs>=21.3.0",
openapi_python_client/templates/pyproject.toml.jinja: "attrs>=21.3.0",
openapi_python_client/templates/setup.py.jinja: install_requires=["httpx >= 0.20.0, < 0.28.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
pyproject.toml: "attrs>=21.3.0",
OpenAPI Spec File
https://raw.githubusercontent.com/Karma3Labs/go-eigentrust/bdf0019ffdcd699053dcf7866bf842640a78b08a/pkg/basic/openapi.yaml
Desktop (please complete the following information):
- OS: Ubuntu 24.04
- Python Version: 3.8.19
- openapi-python-client version 0.21.2
Metadata
Metadata
Assignees
Labels
No labels