Skip to content

xbbg 1.0.0b7

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Mar 06:46
· 357 commits to main since this release

Added

  • Python type stubs for xbbg._core via pyo3-stub-gen: auto-generated .pyi files provide full IDE autocompletion and type-checker support for EngineConfig, Engine, Subscription, and all Rust-backed functions. Includes py.typed PEP 561 marker.
  • macOS ARM64 wheel builds in CI and release workflows. Wheels are now built and tested for Linux x86_64, Windows x86_64, and macOS ARM64 across Python 3.10–3.14.
  • CI auto-regeneration of type stubs: stubs are regenerated and auto-committed after all CI checks pass, ensuring .pyi files stay in sync with Rust annotations.
  • Engine class for non-global multi-engine routing. Create independent engine instances and scope them via with engine: (sync) or async with engine: (async). The global configure() + blp.bdp() API is unchanged — Engine is fully opt-in.
  • TLS support for encrypted B-PIPE connections: tls_client_credentials, tls_trust_material, tls_handshake_timeout_ms on EngineConfig and configure().
  • Identity lifecycle FFI: Session.generate_token(), Session.send_authorization_request(), Session.subscribe_with_identity() for multi-user entitlement flows.
  • Runtime SDK version: get_sdk_info() now includes runtime_version field reporting the linked Bloomberg C SDK version via blpapi_getVersionInfo() (e.g., "3.26.2.1"). Also available as xbbg._core.sdk_version()(major, minor, patch, build) tuple.
  • Async request cancellation: cancelling the Python task for any async Bloomberg request now propagates to the Bloomberg SDK via Session::cancel(correlationId). The worker drops local request state immediately after a successful cancel and remains usable for subsequent requests.
  • Reconnect resilience (Phases 1–3) for the Rust engine (#245):
    • Fail-fast on session death: request workers now immediately drain all in-flight requests with an error on SessionTerminated/SessionConnectionDown instead of letting callers hang indefinitely. Workers are marked Dead and restored to Healthy on SessionConnectionUp.
    • Service re-open before re-subscribe: recover_active_subscriptions() now re-opens all previously opened services before re-issuing subscriptions after reconnect, fixing a critical gap where recovery could silently fail.
    • Health-aware dispatch: request pool round-robin skips Dead workers; returns AllWorkersDown immediately if the entire pool is dead.
    • Retry with exponential backoff: RetryPolicy on EngineConfig (retry_max_retries, retry_initial_delay_ms, retry_backoff_factor, retry_max_delay_ms) enables automatic retry of transient request failures.
    • Recovery limits: max_recovery_attempts and recovery_timeout_ms cap subscription recovery to prevent infinite loops.
    • Lifecycle events: ConnectionLost, Reconnected, and RecoveryFailed events emitted to subscription status for observability.
    • New error variants: BlpAsyncError::SessionLost and AllWorkersDown mapped to Python BlpSessionError.
    • Python surface: all new config fields exposed in EngineConfig, configure(), and Engine(); engine.worker_health() returns per-worker health status.
  • Multi-server failover via servers kwarg (#250). Pass a list of (host, port) tuples for automatic Bloomberg SDK failover using setServerAddress(host, port, index). Existing host/port kwargs unchanged for single-server use.
  • ZFP over leased lines via zfp_remote kwarg (#255). Set to "8194" or "8196" with TLS credentials to connect via Bloomberg Zero Footprint without a local Terminal. Uses ZfpUtil::getOptionsForLeasedLines from the SDK.
  • Identity entitlement checking (#252): Identity.is_authorized(service), Identity.has_entitlements(service, eids), and Identity.seat_type() for B-PIPE multi-user entitlement verification.
  • Bloomberg SDK logging bridge (#253): enable_sdk_logging(level) and EngineConfig.sdk_log_level route native BLPAPI internal logs into xbbg-log tracing target xbbg.sdk. Default is off; registration happens before session start when enabled.

Changed

  • Engine Architecture & EngineConfig documentation: README now includes a full reference for all 20+ EngineConfig fields (worker pools, subscription tuning, buffers, validation, auth), an ASCII architecture diagram, and auth mode examples.
  • API surface updated to v1: README function tables, examples, and Connection Options section now reflect v1 names (blkp, bport, earnings, convert_ccy, configure(), subscribe/stream, etc.) and remove stale v0.x references (lookupSecurity, exchange_tz, set_format, Format enum).
  • Dev setup and contributing guides updated for v1 project structure (py-xbbg/src paths, Astro docs, uv sync dependency-groups).

Fixed

  • cargo-deny advisory ignores for unmaintained unic-* crates (transitive deps of rustpython-parser via pyo3-stub-gen, build-time only).

Full Changelog: v0.12.2...v1.0.0b7