NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1062 most downloaded on PyPI
Python Serial Port Extension
Last release 6 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 3.2 years
Nearly every release is documented
notes for 15 of 16 stable releases
Nothing withdrawn
no release was ever pulled
18 years old
17 releases · first in 2008
[ #540 ] serialposix: Fix inconsistent state after exception in open()
See 3.5b0 for what's all new in this release
Bugfixes
spy: ensure bytes in write()
Bugfixes (posix)
[#540] serialposix: Fix inconsistent state after exception in open()
Bugfixes (win32)
[#530] win32: Fix exception for composite serial number search on Windows
Bugfixes (MacOS)
[#542] list_ports_osx: kIOMasterPortDefault no longer exported on Big Sur
[#545, #545] list_ports_osx: getting USB info on BigSur/AppleSilicon
One column per quarter.
Beta release of pySerial 3.5
Beta release of pySerial 3.5
New Features
[#411] Add a backend for Silicon Labs CP2110/4 HID-to-UART bridge. (depends on hid module)
Improvements
[#315] Use absolute import everywhere
[#351] win32: miniterm Working CMD.exe terminal using Windows 10 ANSI support
[#354] Make ListPortInfo hashable
[#372] threaded: "write" returns byte count
[#400] Add bytesize and stopbits argument parser to tcp_serial_redirect
[#408] loop: add out_waiting
[#495] list_ports_linux: Correct "interface" property on Linux hosts
[#500] Remove Python 3.2 and 3.3 from test
[#261, #285, #296, #320, #333, #342, #356, #358, #389, #397, #510] doc updates
miniterm: add CTRL+T Q as alternative to exit
miniterm: suspend function key changed to CTRL-T Z
add command line tool entries pyserial-miniterm (replaces miniterm.py) and pyserial-ports (runs serial.tools.list_ports).
python -m serial opens miniterm (use w/o args and it will print port list too) [experimental]
Bugfixes
[#371] Don't open port if self.port is not set while entering context manager
[#437, #502] refactor: raise new instances for PortNotOpenError and SerialTimeoutException
[#261, #263] list_ports: set default name attribute
[#286] fix: compare only of the same type in list_ports_common.ListPortInfo
rfc2217/close(): fix race-condition
[#305] return b'' when connection closes on rfc2217 connection
[#386] rfc2217/close(): fix race condition
Fixed flush_input_buffer() for situations where the remote end has closed the socket.
[#441] reset_input_buffer() can hang on sockets
examples: port_publisher python 3 fixes
[#324] miniterm: Fix miniterm constructor exit_character and menu_character
[#326] miniterm: use exclusive access for native serial ports by default
[#497] miniterm: fix double use of CTRL-T + s use z for suspend instead
[#443, #444] examples: refactor wx example, use Bind to avoid deprecated warnings, IsChecked, unichr
Bugfixes (posix)
[#265] posix: fix PosixPollSerial with timeout=None and add cancel support
[#290] option for low latency mode on linux
[#335] Add support to xr-usb-serial ports
[#494] posix: Don't catch the SerialException we just raised
[#519] posix: Fix custom baud rate to not temporarily set 38400 baud rates on linux
[#509 #518] list_ports: use hardcoded path to library on osx
Bugfixes (win32)
[#481] win32: extend RS485 error messages
[#303] win32: do not check for links in serial.tools.list_ports
[#430] Add WaitCommEvent function to win32
[#314, #433] tools/list_ports_windows: Scan both 'Ports' and 'Modem' device classes
[#414] Serial number support for composite USB devices
Added recursive search for device USB serial number to support composite devices
Bugfixes (MacOS)
[#364] MacOS: rework list_ports to support unicode product descriptors.
[#367] Mac and bsd fix _update_break_state
miniterm: suspend function (temporarily release port, Ctrl-T s)
Improvements
miniterm: suspend function (temporarily release port, Ctrl-T s)
[#240] context manager automatically opens port on __enter__
[#141] list_ports: add interface number to location string
[#225] protocol_socket: Retry if BlockingIOError occurs in reset_input_buffer.
Bugfixes
[#153] list_ports: option to include symlinked devices
[#237] list_ports: workaround for special characters in port names
Bugfixes (posix)
allow calling cancel functions w/o error if port is closed
[#220] protocol_socket: sync error handling with posix version
[#227] posix: ignore more blocking errors and EINTR, timeout only applies to blocking I/O
[#228] fix: port_publisher typo
update changes update version
Improvements
[#206] Exclusive access on POSIX. exclusive flag added.
[#172] list_ports_windows: list_ports with 'manufacturer' info property
[#174] miniterm: change cancel impl. for console
[#182] serialutil: add overall timeout for read_until
socket: use non-blocking socket and new Timeout class
socket: implement a functional a reset_input_buffer
rfc2217: improve read timeout implementation
win32: include error message from system in ClearCommError exception
and a few minor changes, docs
Bugfixes
[#183] rfc2217: Fix broken calls to to_bytes on Python3.
[#188] rfc2217: fix auto-open use case when port is given as parameter
Bugfixes (posix)
[#178] in read, count length of converted data
[#189] fix return value of write
Bugfixes (win32)
[#194] spurious write fails with ERROR_SUCCESS
remove serial.aio in favor of separate package, pyserial-asyncio
Changes since V3.1.1:
serial.aio in favor of separate package, pyserial-asyncioSee changes for more details.
Improvements
remove serial.aio in favor of separate package, pyserial-asyncio
add client mode to example tcp_serial_redirect.py
use of monotonic clock for timeouts, when available (Python 3.3 and up)
[#169] arbitrary baud rate support for BSD family
improve tests, improve loop://
Bugfixes
[#137] Exception while cancel in miniterm (python3)
[#143] Class Serial in protocol_loop.py references variable before assigning to it
[#149] Python 3 fix for threaded.FramedPacket
Bugfixes (posix)
[#133] _update_dtr_state throws Inappropriate ioctl for virtual serial port created by socat on OS X
[#157] Broken handling of CMSPAR in serialposix.py
Bugfixes (win32)
[#144] Use Unicode API for list_ports
[#145] list_ports_windows: support devices with only VID
[#162] Write in non-blocking mode returns incorrect value on windows
Nothing published for this version
avoid Python 3 syntax in aio module
Changes since V3.1:
See changes for more details.
Improvements
deprecate nonblocking() method on posix, the port is already in this mode.
style: use .format() in various places instead of "%" formatting
Bugfixes
[#122] fix bug in FramedPacket
[#127] The Serial class in the .NET/Mono (IronPython) backend does not implement the _reconfigure_port method
[#123, #128] Avoid Python 3 syntax in aio module
Bugfixes (posix)
[#126] PATCH: Check delay_before_tx/rx for None in serialposix.py
posix: retry if interrupted in Serial.read
Bugfixes (win32)
win32: handle errors of GetOverlappedResult in read(), fixes #121
new cancel_read() / cancel_write() functions
Changes since V3.0.1:
cancel_read() / cancel_write() functionsSee changes for more details.
Serial keyword arguments, more on backward compatibility, fix #55
special case for FDTIBUS in list_ports on win32 (#61)
Bugfixes
Serial keyword arguments, more on backward compatibility, fix #55
list_ports: return name if product is None, fix for #54
port_publisher: restore some sorting of ports
one code base for Python 2.7 and 3.2+ (support for older Python versions is dropped)
Changes since V2.7:
spy:// and alt://, improvements to rfc2217:// and socket:// (bugfixes, IPv6)Changes since V3.0b1:
See changes for more details.
minor fixes to setup.py (file list), inter_byte_timeout (not stored when passed to __init__), rfc2217 (behavior of close when open failed), list_ports (__str__), loop://, renamed ReaderThread
hwgrep:// added options to pick n'th port, skip busy ports
miniterm: --ask option added
Bugfixes (posix)
[#26/#30] always call tcsettattr on open
[#42] fix disregard read timeout if there is more data
[#45] check for write timeout, even if EAGAIN was raised
Bugfixes (win32)
[#27] fix race condition in read(), fix minimal timeout issue
race condition in nonblocking case
[#49] change exception type in case SetCommState fails
[#50] fixed issue with 0 timeout on windows 10
Win32: setRTS and setDTR can be called before the port is opened and it will set the initial state on port open.
Win32: setRTS and setDTR can be called before the port is opened and it will set the initial state on port open.
Posix: add platform specific method: outWaiting (already present for Win32)
Posix: rename flowControl to setXON to match name on Win32, add flowControlOut function
rfc2217: zero polls value (baudrate, data size, stop bits, parity) (Erik Lundh)
Posix: [Patch pyserial:28] Accept any speed on Linux [update]
Posix: [Patch pyserial:29] PosixSerial.read() should "ignore" errno.EINTR
OSX: [Patch pyserial:27] Scan by VendorID/Product ID for USB Serial devices
Ensure working with bytes in write() calls
Bugfixes
[Bug 3540332] SerialException not returned
[Bug pyserial:145] Error in socket_connection.py
[Bug pyserial:135] reading from socket with timeout=None causes TypeError
[Bug pyserial:130] setup.py should not append py3k to package name
[Bug pyserial:117] no error on lost conn w/socket://
Bugfixes (posix)
[Patch 3462364] Fix: NameError: global name 'base' is not defined
list_ports and device() for BSD updated (Anders Langworthy)
[Bug 3518380] python3.2 -m serial.tools.list_ports error
[Bug pyserial:137] Patch to add non-standard baudrates to Cygwin
[Bug pyserial:141] open: Pass errno from IOError to SerialException
[Bug pyserial:125] Undefined 'base' on list_ports_posix.py, function usb_lsusb
[Bug pyserial:151] Serial.write() without a timeout uses 100% CPU on POSIX
[Patch pyserial:30] [PATCH 1/1] serial.Serial() should not raise IOError.
Bugfixes (win32)
[Bug 3444941] ctypes.WinError() unicode error
[Bug 3550043] on Windows in tools global name 'GetLastError' is not defined
[Bug pyserial:146] flush() does nothing in windows (despite docs)
[Bug pyserial:144] com0com ports ignored due to missing "friendly name"
[Bug pyserial:152] Cannot configure port, some setting was wrong. Can leave port handle open but port not accessible
Moved some of the examples to serial.tools so that they can be used with python -m
New Features
Moved some of the examples to serial.tools so that they can be used with python -m
serial port enumeration now included as serial.tools.list_ports
URL handlers for serial_for_url are now imported dynamically. This allows to add protocols w/o editing files. The list serial.protocol_handler_packages can be used to add or remove user packages with protocol handlers (see docs for details).
new URL type: hwgrep://<regexp> uses list_ports module to search for ports by their description
several internal changes to improve Python 3.x compatibility (setup.py, use of absolute imports and more)
Bugfixes
[Bug 3093882] calling open() on an already open port now raises an exception
[Bug 3245627] connection-lost let rfc2217 hangs in closed loop
[Patch 3147043] readlines() to support multi-character eol
Bugfixes (posix)
[Patch 3316943] Avoid unneeded termios.tcsetattr calls in serialposix.py
[Patch 2912349] Serial Scan as a Module with Mac Support
Bugfixes (win32)
[Bug 3057499] writeTimeoutError when write Timeout is 0
[Bug 3414327] Character out of range in list_ports_windows
[Patch 3036175] Windows 98 Support fix
[Patch 3054352] RTS automatic toggle, for RS485 functionality.
Fix type definitions for 64 bit Windows compatibility
…after a read-timeout). However xreadlines is deprecated and not available when the io module is used. Use for line in Serial(...): instead.
New Features
[Bug 2976262] dsrdtr should default to False dsrdtr parameter default value changed from None (follow rtscts setting) to False. This means rtscts=True enables hardware flow control on RTS/CTS but no longer also on DTR/DSR. This change mostly affects Win32 as on other platforms, that setting was ignored anyway.
Improved xreadlines, it is now a generator function that yields lines as they are received (previously it called readlines which would only return all lines read after a read-timeout). However xreadlines is deprecated and not available when the io module is used. Use for line in Serial(...): instead.
Bugfixes
[Bug 2925854] test.py produces exception with python 3.1
[Bug 3029812] 2.5rc2 readline(s) doesn't work
Bugfixes (posix)
[BUG 3006606] Nonblocking error - Unix platform
Bugfixes (win32)
[Bug 2998169] Memory corruption at faster transmission speeds. (bug introduced in 2.5-rc1)
[Patch 1616790] pyserial: Add inter-character timeout feature
New Features
[Patch 1616790] pyserial: Add inter-character timeout feature
[Patch 1924805] add a setBreak function
Add mark/space parity
Add .NET/Mono backend (IronPython)
Bugfixes (posix)
[Bug 1783159] Arbitrary baud rates (Linux/Posix)
Bugfixes (win32)
[Patch 1561423] Add mark/space parity, Win32
[Bug 2000771] serial port CANNOT be specified by number on windows
examples/scanwin32.py does no longer return \.names
fix \.handling for some cases
Bugfixes (jython)
The Jython backend tries javax.comm and gnu.io (Seo Sanghyeon)
iterator interface. for line in Serial(...): ... is now possible Suggested by Bernhard Bender
New Features
iterator interface. for line in Serial(...): ... is now possible Suggested by Bernhard Bender
sendBreak() accepts a duration argument. Default duration increased.
win32 handles \.COMx format automatically for com ports of higher number (COM10 is internally translated to \.COM10 etc.)
miniterm.py has a new feature to send a file (upload) and configurable special characters for exit and upload. Refactored internals to class based structure (upload and class refactoring by Colin D Bennett)
Bugfixes
[Bug 1451535] TCP/serial redirect example "--help"
update VERSION variable
update wxSerialConfigDialog.py and wxTerminal.py compatibility with wxPython 2.8 (Peleg)
Check for string in write function. Using unicode causes errors, this helps catching errors early (Tom Lynn)
Bugfixes (posix)
[Bug 1554183] setRTS/setDTR reference to non existing local "on"
[Bug 1513653] file descriptor not closed when exception is thrown
FreeBSD now uses cuadX instead of cuaaX (Patrick Phalen)
Bugfixes (win32)
[Bug 1520357] Handle leak
[Bug 1679013] Ignore exception raised by SetCommTimeout() in close().
[Bug 1938118] process hang forever under XP
Fixes setup.py for older distutils
Fixes setup.py for older distutils
Added serial.device() for all platforms
Added serial.device() for all platforms
Bugfixes (win32)
don't recreate overlapped structures and events on each read/write.
don't set unneeded event masks.
don't use DOS device names for ports > 9.
remove send timeout (it's not used in the linux impl. anyway).
Your coding agent can read these notes before it upgrades. Set up the MCP server →