Repository navigation
Added
canonical_port_name(path, *, platform=None): one name for every spelling of a port, for use as a "same port?" key. On Windows,com8,\\.\COM8and\\?\COM8all giveCOM8, thePortInfo.devicediscovery reports. On POSIX, a/dev/serial/by-id/...symlink resolves to its/dev/ttyUSB0target.anyserial.testing.faults_of(port): the liveFaultPlanof aMockBackend-backed port, such as either end ofserial_port_pair(), so tests can inject faults without reaching intoport._backend.- Windows:
SerialPort.port_infois populated when the port opens. It was alwaysNonebefore.
Changed
find_serial_port(device=...)matches any name of the port:device="com8"findsCOM8on Windows, and a by-id symlink finds its target on POSIX. Every name that matched before still matches.
Fixed
- Windows, Trio: an idle
receive()/receive_into()no longer fails with[WinError 1460] This operation returned because the timeout period expiredabout 1 ms after the call. - Windows, Trio: waiting for a modem event no longer fails with
TypeError. - Windows, asyncio: cancelling a modem-event wait no longer corrupts memory and crashes the process.
- Windows: paths that start with
\\?\open correctly. Before,\\.\was prepended to them. - Windows discovery reports
vid,pidandserial_numberfor FTDI adapters, andserial_numberfor USB devices that have one. The FTDI serial number matches what Linux and macOS report.
See CHANGELOG.md for details.