Skip to content

3.0.0

Latest

Choose a tag to compare

@phalt phalt released this 09 Nov 14:48

A major release: entries marked Breaking, Behaviour change or Typing change need attention when upgrading. Regenerate your clients and review the diff; an existing config.py is never overwritten.

  • Breaking: custom HTTP backends' handle_sync_stream / handle_async_stream no longer take inner_type or response_parser and now yield lines as str.
  • Behaviour change: request bodies include defaulted fields again; omitting unset fields is opt-in with BaseConfig(request_body_exclude_unset=True) (#276, spec).
  • Behaviour change: newly generated Config classes read prefixed environment variables (e.g. BILLING_CLIENT_BASE_URL); set the prefix with start-api --env-prefix (#281, spec).
  • Typing change: properties with no required list are generated as optional (#268, spec).
  • Typing change: inline enums are generated as typing.Literal[...], fixing discriminated unions (#278, spec).
  • Typing change: uuid, date-time, date, time and duration string formats map to uuid.UUID and datetime types (#280, spec).
  • Typing change: 2xx no-content responses stay in response_map as None, and response $refs are dereferenced (#265, spec).
  • New start-api --base-class option to set the base class of generated models (#282, spec).
  • APIException and HTTPStatusError now live in clientele.http, and CacheBackend in clientele.api.config; the old import paths still work.
  • Fix generated clients left unformatted when ruff isn't on PATH (#279, spec).
  • Fix duplicate enum members when values differ only by punctuation (#277, spec).
  • Fix schemas.py failing to import when a oneOf/anyOf alias or array model comes before a component it references (#291, spec).