Releases: CaptainDriftwood/python-icap
Release list
v0.2.0
What's Changed
Protocol & Security Hardening
- Drop the connection after a mid-request timeout or socket error so a stale response can never be attributed to the next request (sync and async)
- Async read timeouts now apply per read instead of to the whole response, so slow-but-steady large transfers are no longer cancelled
- Cap chunked trailer sections at the header size limit to prevent unbounded memory growth
- Add header section size limits,
max_response_size, and negative Content-Length / Encapsulated offset / chunk size validation to prevent DoS - Validate service names and filenames against CRLF/request-line injection while still allowing URI query components (e.g.
avscan?allow204=on) - Tolerate non-UTF-8 bytes in response headers (replaced with U+FFFD) instead of failing the whole scan verdict
- Validate status code range and make ICAP headers case-insensitive per RFC 3507
New Features
- Add ISTag header support and Encapsulated header parsing to
IcapResponse - Add
max_response_sizeclient parameter - Full API parity between
IcapClientandAsyncIcapClient
Refactoring
- Extract shared protocol logic into
_protocol.py - Split the pytest plugin
mock.pyinto focused modules (mock_client,mock_async,matchers,call_record,protocols)
Testing & Documentation
- Add property-based fuzzing (Hypothesis), benchmarks, connection robustness, concurrent load, and large-file integration tests (511 unit + 64 integration tests)
- Add
LLMS.txtAPI documentation; expand README with Quick Reference and Preview Mode sections
Breaking Changes
-
IcapResponse.headersis now aCaseInsensitiveDict, not a plaindict. Lookups are case-insensitive per RFC 3507, butisinstance(response.headers, dict)is nowFalseandjson.dumps(response.headers)raisesTypeError. Wrap withdict(response.headers)where a plain dict is required. -
Pytest plugin:
filename_matchespatterns now usere.fullmatchinstead of prefix-anchoredre.match. A pattern must span the entire filename:when(filename_matches=r"invoice")no longer matches"invoice.pdf"— user"invoice.*". -
Pytest plugin:
MockIcapClient.assert_scanneduses substring matching forrespmod()payloads (previously requiredhttp_responseto end with the given bytes). Tests relying on the stricter suffix semantics should assert on the exact payload instead.
Full Changelog: v0.1.2...v0.2.0
v0.1.2
What's Changed
Improvements
- Improved code coverage with additional unit tests for async mock client, error handling, and client method edge cases
- Fixed flaky connection reuse tests by using a more reliable wait mechanism
- Configured coverage to exclude docstrings from coverage metrics
Internal
- Cleaned up test file organization and removed redundant protocol module code
- Version bump to 0.1.2
Full Changelog: v0.1.1...v0.1.2
v0.1.1
What's Changed
- fix: update logo URL for PyPI and fix coverage source path by @CaptainDriftwood in #32
- chore: bump version to 0.1.1 by @CaptainDriftwood in #33
Full Changelog: v0.1.0...v0.1.1
v0.1.0
What's Changed
- feat: RFC 3507 ICAP client with async, SSL/TLS, and pytest plugin by @CaptainDriftwood in #20
- chore: project enhancements and pycap to py-cap rename by @CaptainDriftwood in #22
- ci: bump actions/dependency-review-action from 4.7.1 to 4.8.2 by @dependabot[bot] in #23
- ci: bump codecov/codecov-action from 0561704f0f02c16a585d4c7555e57fa2e44cf909 to 671740ac38dd9b0130fbe1cec585b89eea48d3de by @dependabot[bot] in #24
- ci: bump github/codeql-action from 4.31.9 to 4.31.10 by @dependabot[bot] in #25
- Bump virtualenv from 20.35.4 to 20.36.1 by @dependabot[bot] in #28
- ci: bump actions/checkout from 4.2.2 to 6.0.1 by @dependabot[bot] in #26
- ci: bump actions/labeler from 5.0.0 to 6.0.1 by @dependabot[bot] in #27
- refactor: rename project from py-cap to python-icap by @CaptainDriftwood in #29
- chore: remove manual CodeQL workflow in favor of default setup by @CaptainDriftwood in #30
- fix: add explicit permissions to publish workflow build job by @CaptainDriftwood in #31
New Contributors
- @CaptainDriftwood made their first contribution in #20
- @dependabot[bot] made their first contribution in #23
Full Changelog: https://github.com/CaptainDriftwood/python-icap/commits/v0.1.0