Skip to content

2.0.0

Choose a tag to compare

@phalt phalt released this 22 May 12:24
· 50 commits to main since this release

This release includes many breaking changes, improved type support, and dependency changes.

  • Installation has been split between clientele and clientele[cli].
    • Core: clientele provides the core API framework without any CLI dependencies.
    • CLI: clientele[cli] provides additional dependencies for the CLI and OpenAPI client generation.
  • 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 ty do 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 result and response parameters MUST COME FIRST in function definitions.
    • The new typing support is good enough that newer versions of mypy, pyright and ty should 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 HttpBackend interface.
  • 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.