Skip to content

xbbg 1.0.0rc1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 23 Mar 01:08
· 329 commits to main since this release

Added

  • Intraday timezone controls (request_tz / output_tz): abdib/bdib, abdtick/bdtick, arequest, and Rust RequestParams accept optional request_tz (interpret naive start_datetime/end_datetime before Bloomberg) and output_tz (relabel Arrow time to an IANA zone). Supported labels include UTC, local, exchange, NY/LN/TK/HK, reference tickers, and explicit IANA names. Implemented in xbbg-async (chrono-tz, iana-time-zone) with nested RefData calls routed through request_without_intraday_transform to avoid recursion.
  • Pixi environment management: Added pixi.toml with 11 environments (default, test, lint, benchmark, docs, py310–py314), 21 tasks, and conda-forge deps for Rust, libclang, and pyarrow. Single pixi install && pixi run install replaces manual toolchain setup.
  • mimalloc allocator: PyO3 extension now uses mimalloc by default (feature-gated) for improved Rust-side allocation performance.
  • ty type checking: Lint environment includes Astral's ty type checker alongside ruff; CI lint job now runs type checking automatically.
  • SOCKS5 proxy support (#180): Route Bloomberg connections through a SOCKS5 proxy via socks5_host and socks5_port kwargs on configure() and Engine(). Uses the Bloomberg SDK's Socks5Config API (no auth, hostname + port only).
  • Enterprise-friendly request middleware context: RequestContext now carries a read-only RequestEnvironment snapshot so middleware can inspect engine source, host/port, server list, auth method, app/user context, and validation mode without reaching into private globals.

Changed

  • Workspace default build scope: Root Cargo.toml sets [workspace].default-members to exclude crates/datamock and crates/datamock-sys, so plain cargo build / cargo test at the repo root does not compile the C++ mock stack. Use cargo test -p datamock or cargo build --workspace when working on mocks. The mock Cargo feature on xbbg-sys and downstream crates remains optional and off by default.
  • Standardised on BLPAPI_ROOT: Removed XBBG_DEV_SDK_ROOT env var across the codebase (build.rs, scripts, docs). SDK discovery now uses BLPAPI_ROOT only (set by pixi activation or .cargo/config.toml). No hardcoded SDK version — build.rs scans versioned subdirs automatically.
  • Removed BLPAPI_LINK_LIB_NAME: Library name is now always auto-detected by detect_link_lib_name() based on target platform.
  • Build profiles cleaned up: Removed redundant [profile.release.package.xbbg_core]; added [profile.dev.package."*"] opt-level = 2 so all deps are optimised in dev builds; pixi run install uses target-cpu=native for local builds.
  • Migrated from uv to pixi for dev tooling: Removed [dependency-groups], [tool.uv.*] from pyproject.toml; deleted uv.lock; pre-commit hooks use bare ruff instead of uvx ruff; README dev instructions updated to pixi commands.
  • Consolidated config files: Merged .coveragerc into pyproject.toml [tool.coverage.*]; deleted .env (pixi activation replaces it); un-gitignored .cargo/config.toml (now contains only project-standard BLPAPI_ROOT).
  • CI lint job uses pixi: lint-python job now uses prefix-dev/setup-pixi with the lightweight lint environment, replacing uvx ruff.
  • Request tracing is more consistent: Python request middleware now sees the generated request_id in both RequestContext.request_id and RequestContext.params_dict, centralized request logs include the request ID, and the Rust request path forwards it as the Bloomberg request label for better audit/debug correlation.
  • Bindgen/libclang toolchain aligned: All Rust FFI crates now use bindgen 0.72.1 with runtime loading, and the pixi environment now requires libclang >=22. This fixes incorrect Bloomberg SDK blpapi_ManagedPtr_t_ generation under newer libclang releases and removes the need for correlation-ID layout workarounds.

Removed

  • XBBG_DEV_SDK_ROOT env var: Use BLPAPI_ROOT instead. The .env file fallback in blpapi-sys/build.rs has been removed.
  • BLPAPI_LINK_LIB_NAME env var: Auto-detection covers all platforms.
  • uv.lock: Replaced by pixi.lock.
  • .coveragerc: Configuration moved to pyproject.toml.

Fixed

  • datamock C API (datamock_c_api.cpp): datamock_Message_typeString and datamock_Element_nameString returned const char* into temporaries (Name destroyed at end of full-expression). Pointers are now stable via thread-local string copies before returning.
  • datamock tests: C API integration tests moved to crates/datamock/tests/c_api.rs; message/field strings decoded with lossy UTF-8 (mock data is not always valid UTF-8); tests serialized behind a mutex to avoid races on C++ global state; build.rs passes -Wno-unused-parameter for stub-heavy sources.
  • datamock C++ warnings: Safer null/empty check in Name equality vs C string; ServiceRefData marks name / createRequest with override; SchemaTypeDefinition destructor matches throwing body with noexcept(false).
  • De-duplicated Rust recipe helpers: Extracted array_value_as_string, date32_to_naive, as_string_col into shared xbbg-recipes/src/utils.rs.
  • De-duplicated Python code: Consolidated _to_pandas_wide (was in both info.py and bloomberg.py); unified _FUTURES_MONTH_CODES to use Rust-sourced ext_get_futures_months(); extracted _apply_settle_override helper replacing 5 repeated blocks in bonds.py.

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