v3.0.0
What's Changed
API improvements
- Added
CustomerIO.batch()support for the Track API v2 batch endpoint in #123 - Added event deduplication support for
track()andtrack_anonymous()via optional top-levelidandtimestampfields in #125 - Track API methods now return
requests.Responseobjects so callers can inspect status codes, headers, and response details in #122 - Added
close()and context manager support forCustomerIOandAPIClientto cleanly close sessions in #121 - Fixed the transactional request keyword spelling to
disable_css_preprocessingin #117
Breaking Changes
- Python 3.10+ is now required. Packaging metadata and CI now target Python 3.10 through 3.14.
track()andtrack_anonymous()now take custom event attributes in adatadict 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"})
- Before:
- Track API methods now return
requests.Responseobjects instead ofNone. Existing fire-and-forget calls are unaffected, but code that checks forNonereturn values may need updating. ClientBase.send_request()now returns the fullrequests.Responseinstead ofresponse.text.- The misspelled
disable_css_preproceessingtransactional email argument was removed. Usedisable_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=Falsecreates and closes a fresh session per request in #118 - Fixed a possible
AttributeErrorduring 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
identifiersusing an email address by @glosier in #97
Contributors
Thanks to everyone who contributed code, reports, investigation, or earlier PR work that shaped this release:
- @louison, first-time contributor in #99
- @bpeterman, first-time contributor in #109
- @rollerbrick, whose no-pooling session isolation work from #94 informed #118
- @joandvgv, whose event deduplication PR #98 informed #125
- @skion, for identifying the POST retry root cause in #76
Full Changelog: v2.4.0...v3.0.0