github doronz88/pymobiledevice3 v10.0.4

latest releases: v11.12.4, v11.12.3, v11.12.2...
one month ago

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

Don't miss a new pymobiledevice3 release

NewReleases is sending notifications on new releases.