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_FILEfor a private CA. SMTP authentication requires TLS and both credentials. Choosenonefor 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. SetKEYCLOAK__TOKEN_VALIDATION__EXPECTED_ISSUERwhen tokens use a different URL. SetEXPECTED_AUDIENCEin 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__SSLwithREDIS__TLS__IS_ENABLED. Vault bootstrap also uses nested names. - Uvicorn Fields on FastAPI - Move server options to
UVICORN, including itsTLS,LIMITS, andWEBSOCKETgroups. Set bind host and port underFASTAPI. - 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 opportunisticautomode and the TLS verification toggle.
Helpers - Imports¶
- Decorator Aliases - Replace deprecated import paths,
*_decoratornames, and the separate async tracing, metrics, and atomic aliases. Import SQLAlchemy atomic decorators fromarchipy.adapters.base.sqlalchemy.atomic. - Error and Auth Utilities - Import the error helpers directly from
archipy.helpers.errorsandarchipy.helpers.errors.fastapi. Import Keycloak guards fromarchipy.adapters.keycloak.auth. - OpenTelemetry Logging - The logging bridge uses the handler supplied by the
otelextra. 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'srequest.state. Migrate old Keycloak type aliases and auth DTO imports toarchipy.models.dtos.keycloakand its submodules. - Redis HASH Upserts - Remove the
replaceargument fromupsert_hash()andupsert_hash_dto(). Both operations merge supplied fields into the hash. - Temporal Compatibility APIs - Replace
stop_schedule()withdelete_schedule()orpause_schedule(). Pass deployment versions throughstart_worker(deployment_config=...). Configure TLS throughTEMPORAL.TLSand readmessaging.operation.typeon 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.