Highlights
🐛 Fix protocol desync when running under python -O
assert statements are stripped by Python's optimized mode together with their expressions. Several asserts in OsTraceService (create_archive / collect, syslog) and CrashReportsManager.flush performed the actual protocol reads inside the assert expression, so running with python -O (or PYTHONOPTIMIZE) silently skipped those reads and desynced the service stream instead of failing cleanly.
These paths now always perform the read and raise ProtocolError on unexpected responses — which also means invalid device responses now raise a proper pymobiledevice3 exception instead of a bare AssertionError:
PYTHONOPTIMIZE=1 pymobiledevice3 syslog collect out.logarchive # now works correctlyWhat's Changed
Full Changelog: v10.7.0...v10.7.1