pypi primp 1.3.0
v1.3.0

4 hours ago

What's Changed

  • chore: merge upstream dependency bumps and apply clippy fixes by @deedy5 in #144
  • Misc fixes and refactors by @deedy5 in #145
  • refactor: deduplicate browser impersonation, add H2 window update fingerprinting, clean up Python response bindings by @deedy5 in #146
  • DNS resolver customization (DoH/DoT/plain), hickory-resolver 0.26 upgrade, and minor fixes by @deedy5 in #147
  • perf: cache CryptoProvider/RootCertStore/BrowserEmulator, optimize Python iterators, fix Random OS consistency by @deedy5 in #148

Release v1.3.0 details

✨ Features

  • DNS resolver customization — DoH, DoT, and plain DNS resolvers with Python bindings (primp-reqwest)
  • Firefox WINDOW_UPDATE support — initial_stream_window_increment for HTTP/2 flow control across h2 → hyper → reqwest
  • New browser profiles — Chrome 147/148, Edge 147/148, Opera 130/131; refactored impersonation infrastructure with Arc
  • Cached emulators — OnceLock-cached browser emulators eliminate per-request construction overhead
  • deflate field — added to BrowserSettings and apply_impersonation

🐛 Fixes

  • Consistent ImpersonateOS::Random — resolved once at top of build_*_settings so User-Agent, os_platform, and sec-ch-ua-mobile all agree
  • Header order & Sec-CH-UA corrections — fixed positions, grease values, brand permutations matching Chromium's GenerateBrandVersionList
  • DohResolver timeout — per-query timeout prevents hang, enables ChainedResolver fallback
  • WASM gating — h2-referencing code and impersonate code properly #[cfg]-gated
  • Python error chains — exception messages include full source chain; non-object data sent as raw body
  • max_local_error_reset_streams — wrapped in Some() for correct h2 API type
  • primp-h2 clippy — replaced modulo with is_multiple_of
  • primp-rustls — removed duplicate debug log in ClientHello
  • Docs.rs build — excluded incompatible http3 feature, added rustc-args for reqwest_unstable

⚡ Performance

  • Cache CryptoProvider and RootCertStore; Arc in OnceLock
  • Eliminate recursion in os_platform/build_user_agent
  • Python: cache encoding per iterator, pre-alloc buffers, eliminate headers.clone(), reduce lock scope
    🔧 Upstream Merges
  • primp-hyper 1.8.1 → 1.9.0 (15 files, removed pin-utils, added max_local_error_reset_streams)
  • primp-reqwest 0.13.2 → 0.13.3 (H3 fixes, CRL PEM parsing, debug logging)
  • primp-rustls 0.23.38 → 0.23.40 (runtime FIPS detection, ECH padding fixes)
  • primp-hyper-rustls 0.27.7 → 0.27.9 (removed pki-types dep, rustls-platform-verifier 0.7)
  • hickory-resolver 0.25.2 → 0.26.1 (fixes NSEC3 DoS vulnerability)

🏗️ Refactors & Chores

  • Python: extracted shared response/body logic into response_shared.rs (~300 lines eliminated)
  • Python: replaced once_cell with std::sync::LazyLock
  • MSRV bumped to 1.89.0
  • CI: removed pinned maturin version, updated attest action
  • Workspace-wide clippy fixes (io::Error::other(), module attributes, etc.)

Full Changelog: v1.2.3...v1.3.0

Don't miss a new primp release

NewReleases is sending notifications on new releases.