Skip to content

6.0.0 — 2026-11-22

← 6.0.1 | 5.32.0 → | ↑ 6.x series

Migrate imports, settings, and adapter calls with the ArchiPy 6.0 upgrade guide.

Changed

Adapters - Security

  • Email - SMTP defaults to STARTTLS. STARTTLS and implicit TLS verify the server certificate and hostname. Set EMAIL__TLS__CA_FILE for a private CA. SMTP authentication requires TLS and both credentials. Choose none for unauthenticated clear-text delivery.
  • Keycloak - Local token verification requires a matching issuer and typ == "Bearer". The issuer defaults to the configured server and realm URL. Set KEYCLOAK__TOKEN_VALIDATION__EXPECTED_ISSUER when tokens use a different URL. Set EXPECTED_AUDIENCE in the same group to verify the token audience.

Adapters - Kafka and Elasticsearch

  • Kafka Keys - Omitting the producer key sends a Kafka null key. Pass key="" to send an explicit empty key.
  • Elasticsearch Errors - The adapters raise ArchiPy errors for Elasticsearch API and transport failures. The original exception remains available through __cause__.

Helpers - Optional Imports

  • Lazy SDK Loading - Python 3.15 defers selected SDK-backed public imports until use. Keycloak loads resource mixins on demand. Adapters with explicit clients, config, or SQLAlchemy engines defer reading global settings where possible. #624

Removed

Configs - Flat Settings

  • Config Aliases - Use nested groups in Python and double underscores between fields in environment variables. For example, replace REDIS__SSL with REDIS__TLS__IS_ENABLED. Vault bootstrap also uses nested names.
  • Uvicorn Fields on FastAPI - Move server options to UVICORN, including its TLS, LIMITS, and WEBSOCKET groups. Set bind host and port under FASTAPI.
  • Retired Options - Remove ELASTIC.MAP_ERRORS, KAFKA.EMPTY_KEY_FOR_MISSING_KEY, and the four ScyllaDB per-host pool-sizing fields from configuration. SMTP drops opportunistic auto mode and the TLS verification toggle.

Helpers - Imports

  • Decorator Aliases - Replace deprecated import paths, *_decorator names, and the separate async tracing, metrics, and atomic aliases. Import SQLAlchemy atomic decorators from archipy.adapters.base.sqlalchemy.atomic.
  • Error and Auth Utilities - Import the error helpers directly from archipy.helpers.errors and archipy.helpers.errors.fastapi. Import Keycloak guards from archipy.adapters.keycloak.auth.
  • OpenTelemetry Logging - The logging bridge uses the handler supplied by the otel extra. The SDK handler fallback is removed.

Adapters - Keycloak, Redis, and Temporal

  • Keycloak Compatibility APIs - Pass request DTOs and read response DTO attributes. Use AuthContextManager.get_auth_context() for auth data previously stored on FastAPI's request.state. Migrate old Keycloak type aliases and auth DTO imports to archipy.models.dtos.keycloak and its submodules.
  • Redis HASH Upserts - Remove the replace argument from upsert_hash() and upsert_hash_dto(). Both operations merge supplied fields into the hash.
  • Temporal Compatibility APIs - Replace stop_schedule() with delete_schedule() or pause_schedule(). Pass deployment versions through start_worker(deployment_config=...). Configure TLS through TEMPORAL.TLS and read messaging.operation.type on Temporal spans.

Tests

  • Migration Coverage - Exercise nested settings, SMTP security, Kafka null and empty keys, Keycloak DTOs and auth context, Elasticsearch error mapping, and Redis HASH merges.