Skip to content

v10.0.4

Choose a tag to compare

@doronz88 doronz88 released this 23 Jul 11:16
· 351 commits to master since this release
6c784c3

Highlights

🐛 Fix device restore hanging after reset() (regression since v9.40.0)

A device restore/update could hang indefinitely at If the restore hangs here, disconnect & reconnect the device: IRecv._find() would spin forever and never re-acquire the device after a USB reset() ("no device in the desired mode"), even though the device was present — a fresh re-run of the restore would then succeed.

Root cause: the v9.40.0 typing cleanup introduced local captures (device = self.device) in send_buffer(), which calls reset()_reinit() while that local is still live. Setting self._device = None therefore no longer dropped the last reference, so the usb.core.Device was never garbage-collected and its libusb handle stayed claimed — blocking the reset device from re-enumerating and hanging the subsequent _find(). _reinit() now releases the handle explicitly via usb.util.dispose_resources(), independent of refcount/GC.

If you hit this on v9.40.0–v10.0.3, upgrade:

python3 -m pip install -U pymobiledevice3

🧹 Static-typing hardening (no user-facing behavior change)

The package is now considerably more strictly typed, which surfaced and fixed several latent bugs along the way. The DTX and CoreDevice-tunnel wire structs moved to construct's typed DataclassStruct API (byte-identical wire format, verified on both the Python 3.9 and 3.10+ construct-typing lines), all bare dict/list generics were parametrized, and every function parameter is now annotated — with reportMissingTypeArgument and reportMissingParameterType enforced package-wide in CI.

What's Changed

Full Changelog: v10.0.3...v10.0.4