• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agronholm / cbor2 / 22529269973

28 Feb 2026 09:21PM UTC coverage: 94.58%. Remained the same
22529269973

push

github

web-flow
Set default read_size to 1 for backwards compatibility (#275)

The buffered reads introduced in 5.8.0 could cause issues when code needs to access the stream position after decoding. This changes the default back to 1 (matching 5.7.1 behavior) while allowing users to opt-in to faster decoding by passing read_size=4096.

Implementation details:
- Use function pointer dispatch to eliminate runtime checks for read_size=1
- Skip buffer allocation entirely for unbuffered path
- Add read_size parameter to load() and loads() for API completeness

---------

Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>

1047 of 1107 relevant lines covered (94.58%)

10.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.94
/_decoder.py


Source Not Available

The file "_decoder.py" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc