xbbg 1.0.0rc1
Pre-release
Pre-release
·
329 commits
to main
since this release
Added
- Intraday timezone controls (
request_tz/output_tz):abdib/bdib,abdtick/bdtick,arequest, and RustRequestParamsaccept optionalrequest_tz(interpret naivestart_datetime/end_datetimebefore Bloomberg) andoutput_tz(relabel Arrowtimeto an IANA zone). Supported labels includeUTC,local,exchange,NY/LN/TK/HK, reference tickers, and explicit IANA names. Implemented inxbbg-async(chrono-tz,iana-time-zone) with nested RefData calls routed throughrequest_without_intraday_transformto avoid recursion. - Pixi environment management: Added
pixi.tomlwith 11 environments (default, test, lint, benchmark, docs, py310–py314), 21 tasks, and conda-forge deps for Rust, libclang, and pyarrow. Singlepixi install && pixi run installreplaces manual toolchain setup. - mimalloc allocator: PyO3 extension now uses mimalloc by default (feature-gated) for improved Rust-side allocation performance.
tytype checking: Lint environment includes Astral'stytype checker alongside ruff; CI lint job now runs type checking automatically.- SOCKS5 proxy support (#180): Route Bloomberg connections through a SOCKS5 proxy via
socks5_hostandsocks5_portkwargs onconfigure()andEngine(). Uses the Bloomberg SDK'sSocks5ConfigAPI (no auth, hostname + port only). - Enterprise-friendly request middleware context:
RequestContextnow carries a read-onlyRequestEnvironmentsnapshot 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.tomlsets[workspace].default-membersto excludecrates/datamockandcrates/datamock-sys, so plaincargo build/cargo testat the repo root does not compile the C++ mock stack. Usecargo test -p datamockorcargo build --workspacewhen working on mocks. ThemockCargo feature onxbbg-sysand downstream crates remains optional and off by default. - Standardised on
BLPAPI_ROOT: RemovedXBBG_DEV_SDK_ROOTenv var across the codebase (build.rs, scripts, docs). SDK discovery now usesBLPAPI_ROOTonly (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 bydetect_link_lib_name()based on target platform. - Build profiles cleaned up: Removed redundant
[profile.release.package.xbbg_core]; added[profile.dev.package."*"] opt-level = 2so all deps are optimised in dev builds;pixi run installusestarget-cpu=nativefor local builds. - Migrated from uv to pixi for dev tooling: Removed
[dependency-groups],[tool.uv.*]from pyproject.toml; deleteduv.lock; pre-commit hooks use bareruffinstead ofuvx ruff; README dev instructions updated to pixi commands. - Consolidated config files: Merged
.coveragercintopyproject.toml[tool.coverage.*]; deleted.env(pixi activation replaces it); un-gitignored.cargo/config.toml(now contains only project-standardBLPAPI_ROOT). - CI lint job uses pixi:
lint-pythonjob now usesprefix-dev/setup-pixiwith the lightweightlintenvironment, replacinguvx ruff. - Request tracing is more consistent: Python request middleware now sees the generated
request_idin bothRequestContext.request_idandRequestContext.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.1with runtime loading, and the pixi environment now requireslibclang >=22. This fixes incorrect Bloomberg SDKblpapi_ManagedPtr_t_generation under newer libclang releases and removes the need for correlation-ID layout workarounds.
Removed
XBBG_DEV_SDK_ROOTenv var: UseBLPAPI_ROOTinstead. The.envfile fallback inblpapi-sys/build.rshas been removed.BLPAPI_LINK_LIB_NAMEenv var: Auto-detection covers all platforms.uv.lock: Replaced bypixi.lock..coveragerc: Configuration moved topyproject.toml.
Fixed
- datamock C API (
datamock_c_api.cpp):datamock_Message_typeStringanddatamock_Element_nameStringreturnedconst char*into temporaries (Namedestroyed 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.rspasses-Wno-unused-parameterfor stub-heavy sources. - datamock C++ warnings: Safer null/empty check in
Nameequality vs C string;ServiceRefDatamarksname/createRequestwithoverride;SchemaTypeDefinitiondestructor matches throwing body withnoexcept(false). - De-duplicated Rust recipe helpers: Extracted
array_value_as_string,date32_to_naive,as_string_colinto sharedxbbg-recipes/src/utils.rs. - De-duplicated Python code: Consolidated
_to_pandas_wide(was in bothinfo.pyandbloomberg.py); unified_FUTURES_MONTH_CODESto use Rust-sourcedext_get_futures_months(); extracted_apply_settle_overridehelper replacing 5 repeated blocks inbonds.py.
Full Changelog: v0.12.2...v1.0.0rc1