Repository navigation
2.0.0
This release includes many breaking changes, improved type support, and dependency changes.
- Installation has been split between
clienteleandclientele[cli].- Core:
clienteleprovides the core API framework without any CLI dependencies. - CLI:
clientele[cli]provides additional dependencies for the CLI and OpenAPI client generation.
- Core:
- Drastically improved typing support for injected parameters.
- Previously we relied on a mypy plugin to handle the typing of injected parameters.
- New type linting tools like
tydo not offer a plugin, so we had to find a different approach. - We now use a custom type checker to provide accurate type information for injected parameters.
- A side effect of this is that the
resultandresponseparameters MUST COME FIRST in function definitions. - The new typing support is good enough that newer versions of
mypy,pyrightandtyshould work with it out of the box.
- Client generator has been updated to use the new type checker conventions (inject parameters must go first in function signatures).
- Dev dependencies have been updated to latest versions.
- Migrated httpx to httpx2.
- Given the feature freeze on httpx, we have opted to move to httpx2.
- Clientele supports HttpBackends with httpx2 as a default.
- In the future, we may add bundled support for other backends.
- You can still use your own httpx backend by implementing the
HttpBackendinterface.
- Configuration options for httpx have been removed from
BaseConfig.- This is the final step in moving to the HttpBackends interface.
- Cleaned up tests for the old style APIClients (before the Clientele framework was introduced).
- Handle generic alias reponse types better (#240).
- Refactor the old Standard APIClient generator to be a generic base class.