Skip to content

v3.0.0

Choose a tag to compare

@hownowstephen hownowstephen released this 11 May 15:07
· 9 commits to main since this release
4a98d69

What's Changed

API improvements

  • Added CustomerIO.batch() support for the Track API v2 batch endpoint in #123
  • Added event deduplication support for track() and track_anonymous() via optional top-level id and timestamp fields in #125
  • Track API methods now return requests.Response objects so callers can inspect status codes, headers, and response details in #122
  • Added close() and context manager support for CustomerIO and APIClient to cleanly close sessions in #121
  • Fixed the transactional request keyword spelling to disable_css_preprocessing in #117

Breaking Changes

  • Python 3.10+ is now required. Packaging metadata and CI now target Python 3.10 through 3.14.
  • track() and track_anonymous() now take custom event attributes in a data dict instead of arbitrary keyword arguments.
    • Before: cio.track(5, "purchase", type="socks", price="13.99")
    • After: cio.track(5, "purchase", {"type": "socks", "price": "13.99"})
  • Track API methods now return requests.Response objects instead of None. Existing fire-and-forget calls are unaffected, but code that checks for None return values may need updating.
  • ClientBase.send_request() now returns the full requests.Response instead of response.text.
  • The misspelled disable_css_preproceessing transactional email argument was removed. Use disable_css_preprocessing.

Reliability and networking

  • Fixed retry behavior for POST requests, including retries for transient 5xx responses, clean 4xx error handling, and support for all 2xx success responses in #119
  • Fixed no-pooling session isolation so use_connection_pooling=False creates and closes a fresh session per request in #118
  • Fixed a possible AttributeError during session cleanup by @bpeterman in #109
  • Added TCP keepalive socket options for outbound HTTPS connections in #124

Packaging, CI, and release automation

  • Modernized packaging with pyproject.toml, PEP 621 metadata, updated dependency constraints, Ruff tooling, and a Python 3.10-3.14 CI matrix in #116
  • Added automated PyPI publishing for GitHub releases using trusted publishing in #120
  • Removed tests from distributed packages by @louison in #99
  • Updated Makefile and CI workflow configuration in #115
  • Bumped the package version to 3.0.0 in #126

Documentation

  • Clarified the transactional email example to show identifiers using an email address by @glosier in #97

Contributors

Thanks to everyone who contributed code, reports, investigation, or earlier PR work that shaped this release:

Full Changelog: v2.4.0...v3.0.0