Releases: hardbyte/python-can
Releases · hardbyte/python-can
Generate Changelog for v4.6.0 (#1970)
🚀 Highlights
- 🆕 New CLI tool:
can_bridge
— bridge two physical CAN buses in software viapython -m can.bridge
. - 📡 Expanded protocol support:
- 11-bit identifiers, remote frames, and error frames in the
serial
interface. - CAN FD support in
slcan
for CANable 2.0 devices. - Error message support in the
socketcand
interface. - Remote frame support in
TRCReader
.
- 11-bit identifiers, remote frames, and error frames in the
- 🖥 Windows support: Added support for the
udp_multicast
interface on Windows. - 🔔 Notifier improvements:
- Track active Notifiers and use them as context managers.
- New helper:
Notifier.find_instances(bus)
to discover active Notifiers.
- 🛠 Better CLI integration: Public functions
can.cli.add_bus_arguments
andcan.cli.create_bus_from_namespace
for downstream packages to easily configure and parse python-can bus options.
Added
- Add support for 11-bit identifiers in the
serial
interface. (#1758) - Add context manager support and active instance tracking to
Notifier
, plusNotifier.find_instances(bus)
. (#1890) - Add Windows support to
udp_multicast
interface. (#1914) - Add FD support to
slcan
according to CANable 2.0 implementation. (#1920) - Add support for error messages to the
socketcand
interface. (#1941) - Add support for remote and error frames in the
serial
interface. (#1948) - Add public functions
can.cli.add_bus_arguments
andcan.cli.create_bus_from_namespace
for creating bus command line options. Currently downstream packages need to implement their own logic to configure python-can buses. Now python-can can create and parse bus options for third party packages. (#1949) - Add support for remote frames to
TRCReader
. (#1953) - Mention the
python-can-candle
package in the plugin interface section of the documentation. (#1954) - Add new CLI tool
python -m can.bridge
(or justcan_bridge
) to create a software bridge between two physical buses. (#1961)
🔧 Changed
- Allow sending Classic CAN frames with a DLC value larger than 8 using the
socketcan
interface. (#1851) - Rename the
gs_usb
extra dependency togs-usb
. (#1945) - New PEP 735 dependency groups
lint
,docs
andtest
. (#1945) - Update dependency name from
zlgcan-driver-py
tozlgcan
. (#1946) - Use ThreadPoolExecutor in
detect_available_configs()
to reduce runtime and addtimeout
parameter. (#1947) - Update contribution guide. (#1960)
🗑 Removed
- Remove support for Python 3.8. (#1931)
- Unknown command line arguments ("extra args") are no longer passed down to
can.Bus()
instantiation. Use the--bus-kwargs
argument instead. (#1949) - Remove
can.io.generic.BaseIOHandler
class. Improvecan.io.*
type annotations by usingtyping.Generic
. (#1951)
🐞 Fixed
- Fix a bug in
slcanBus.get_version()
andslcanBus.get_serial_number()
: If any other data was received during the function call, thenNone
was returned. (#1904) - Fix incorrect padding of CAN FD payload in
BlfReader
. (#1906) - Set correct message direction for messages received with
kvaser
interface andreceive_own_messages=True
. (#1908) - Fix timestamp rounding error in
BlfWriter
. (#1921) - Fix timestamp rounding error in
BlfReader
. (#1927) - Handle timer overflow message and build timestamp according to the epoch in the
ixxat
interface. (#1934) - Avoid unsupported
ioctl
function call to allow usage of theudp_multicast
interface on MacOS. (#1940) - Fix configuration file parsing for the
state
bus parameter. (#1957) Mf4Reader
: support non-standardCAN_DataFrame.Dir
values in mf4 files created by ihedvall/mdflib. (#1967)- PcanBus: Set
Message.channel
attribute inPcanBus.recv()
. (#1969)
4.5.0
Features
- gs_usb command-line support (and documentation updates and stability fixes) by @BenGardiner in #1790
- Faster and more general MF4 support by @cssedev in #1892
- ASCWriter speed improvement by @pierreluctg in #1856
- Faster Message string representation by @pierreluctg in #1858
- Added Netronic's CANdo and CANdoISO adapters interface by @belliriccardo in #1887
- Add autostart option to BusABC.send_periodic() to fix issue #1848 by @SWolfSchunk in #1853
- Improve TestBusConfig by @zariiii9003 in #1804
- Improve speed of TRCReader by @lebuni in #1893
Bug Fixes
- Fix Kvaser timestamp by @zariiii9003 in #1878
- Set end_time in ThreadBasedCyclicSendTask.start() by @zariiii9003 in #1871
- Fix regex in _parse_additional_config() by @zariiii9003 in #1868
- Fix for #1849 (PCAN fails when PCAN_ERROR_ILLDATA is read via ReadFD) by @bures in #1850
- Period must be >= 1ms for BCM using Win32 API by @pierreluctg in #1847
- Fix ASCReader Crash on "Start of Measurement" Line by @RitheeshBaradwaj in #1811
- Resolve AttributeError within NicanError by @vijaysubbiah20 in #1806
Miscellaneous
- Fix CI by @zariiii9003 in #1889
- Update msgpack dependency by @zariiii9003 in #1875
- Add tox environment for doctest by @zariiii9003 in #1870
- Use typing_extensions.TypedDict on python < 3.12 for pydantic support by @NickCao in #1845
- Replace PyPy3.8 with PyPy3.10 by @zariiii9003 in #1838
- Fix slcan tests by @zariiii9003 in #1834
- Test on Python 3.13 by @zariiii9003 in #1833
- Stop notifier in examples by @zariiii9003 in #1814
- Use setuptools_scm by @zariiii9003 in #1810
- Added extra info for Kvaser dongles by @FedericoSpada in #1797
- Socketcand: show actual response as well as expected in error by @liamkinne in #1807
- Refactor CLI filter parsing, add tests by @zariiii9003 in #1805
- Add zlgcan to docs by @zariiii9003 in #1839
4.4.2
Bug Fixes
- Remove
abstractmethod
decorator fromListener.stop()
(#1770, #1795) - Fix
SizedRotatingLogger
file suffix bug (#1792, #1793) - gs_usb: Use
BitTiming
class internally to configure bitrate (#1747, #1748) - pcan: Fix unpack error in
PcanBus._detect_available_configs()
(#1767) - socketcan: Improve error handling in
SocketcanBus.__init__()
(#1771) - socketcan: Do not log exception on non-linux platforms (#1800)
- vector, kvaser: Activate channels after CAN filters were applied (#1413, #1708, #1796)
Features
4.4.0
Features
- TRC 1.3 Support: Added support for .trc log files as generated by PCAN Explorer v5 and other tools, expanding compatibility with common log file formats (#1753).
- ASCReader refactor: improved the ASCReader code (#1717).
- SYSTEC Interface Enhancements: Added the ability to pass an explicit DLC value to the send() method when using the SYSTEC interface, enhancing flexibility for message definitions (#1756).
- Socketcand Beacon Detection: Introduced a feature for detecting socketcand beacons, facilitating easier connection and configuration with socketcand servers (#1687).
- PCAN Driver Echo Frames: Enabled echo frames in the PCAN driver when receive_own_messages is set, improving feedback for message transmissions (#1723).
- CAN FD Bus Connection for VectorBus: Enabled connecting to CAN FD buses without specifying bus timings, simplifying the connection process for users (#1716).
- Neousys Configs Detection: Updated the detection mechanism for available Neousys configurations, ensuring more accurate and comprehensive configuration discovery (#1744).
Bug Fixes
- Send Periodic Messages: Fixed an issue where fixed-duration periodic messages were sent one extra time beyond their intended count (#1713).
- Vector Interface on Windows 11: Addressed compatibility issues with the Vector interface on Windows 11, ensuring stable operation across the latest OS version (#1731).
- ASCWriter Millisecond Handling: Corrected the handling of milliseconds in ASCWriter, ensuring accurate time representation in log files (#1734).
- Various minor bug fixes: Addressed several minor bugs to improve overall stability and performance.
Miscellaneous
- Invert default value logic for BusABC._is_shutdown. (#1774)
- Implemented various logging enhancements to provide more detailed and useful operational insights (#1703).
- Updated CI to use OIDC for connecting GitHub Actions to PyPi, improving security and access control for CI workflows.
- Fix CI to work for MacOS (#1772).
The release also includes various other minor enhancements and bug fixes aimed at improving the reliability and performance of the software.
v4.4.0-rc.2
Features
- TRC 1.3 Support: Added support for .trc log files as generated by PCAN Explorer v5 and other tools, expanding compatibility with common log file formats (#1753).
- ASCReader refactor: improved the ASCReader code (#1717).
- SYSTEC Interface Enhancements: Added the ability to pass an explicit DLC value to the send() method when using the SYSTEC interface, enhancing flexibility for message definitions (#1756).
- Socketcand Beacon Detection: Introduced a feature for detecting socketcand beacons, facilitating easier connection and configuration with socketcand servers (#1687).
- PCAN Driver Echo Frames: Enabled echo frames in the PCAN driver when receive_own_messages is set, improving feedback for message transmissions (#1723).
- CAN FD Bus Connection for VectorBus: Enabled connecting to CAN FD buses without specifying bus timings, simplifying the connection process for users (#1716).
- Neousys Configs Detection: Updated the detection mechanism for available Neousys configurations, ensuring more accurate and comprehensive configuration discovery (#1744).
Bug Fixes
- Send Periodic Messages: Fixed an issue where fixed-duration periodic messages were sent one extra time beyond their intended count (#1713).
- Vector Interface on Windows 11: Addressed compatibility issues with the Vector interface on Windows 11, ensuring stable operation across the latest OS version (#1731).
- ASCWriter Millisecond Handling: Corrected the handling of milliseconds in ASCWriter, ensuring accurate time representation in log files (#1734).
- Various minor bug fixes: Addressed several minor bugs to improve overall stability and performance.
Miscellaneous
- Invert default value logic for BusABC._is_shutdown. (#1774)
- Implemented various logging enhancements to provide more detailed and useful operational insights (#1703).
- Updated CI to use OIDC for connecting GitHub Actions to PyPi, improving security and access control for CI workflows.
- Fix CI to work for MacOS (#1772).
The release also includes various other minor enhancements and bug fixes aimed at improving the reliability and performance of the software.
v4.3.2 Pre-release 4
v4.3.2-rc.4 Update CI.yml workflow
v4.3.2-rc.3
Allow release without tests
4.3.1
4.3.0
In this release, we've raised the minimum Python version to 3.8, added several new features to the API and as always plenty of bug fixes and interface improvements.
Breaking Changes
Bug Fixes
- Vector: channel detection fails, if there is an active flexray channel (#1634)
- ixxat: Fix exception in 'state' property on bus coupling errors (#1647)
- NeoVi: Fixed serial number range (#1650)
- PCAN: Fix timestamp offset due to timezone (#1651)
- Catch
pywintypes.error
in broadcast manager (#1659) - Fix BLFReader error for incomplete or truncated stream (#1662)
- PCAN: remove Windows registry check to fix 32bit compatibility (#1672)
- Vector: Skip the
can_op_mode check
if the device reportscan_op_mode=0
(#1678) - Vector: using the config from
detect_available_configs
might raise XL_ERR_INVALID_CHANNEL_MASK error (#1681)
Features
API
- Add
modifier_callback
parameter toBusABC.send_periodic
for auto-modifying cyclic tasks (#703) - Add
protocol
property to BusABC to determine active CAN Protocol (#1532) - Change Bus constructor implementation and typing (#1557)
- Add optional
strict
parameter to relax BitTiming & BitTimingFd Validation (#1618) - Add
BitTiming.iterate_from_sample_point
static methods (#1671)
IO
- Can Player compatibility with interfaces that use additional configuration (#1610)
Interface Improvements
- Kvaser: Add BitTiming/BitTimingFd support to KvaserBus (#1510)
- Ixxat: Implement
detect_available_configs
for the Ixxat bus. (#1607) - NeoVi: Enable send and receive on network ID above 255 (#1627)
- Vector: Send HighPriority Message to flush Tx buffer (#1636)
- PCAN: Optimize send performance (#1640)
- PCAN: Support version string of older PCAN basic API (#1644)
- Kvaser: add parameter exclusive and
override_exclusive
(#1660) - socketcand: Add parameter
tcp_tune
to reduce latency (#1683)
Miscellaneous
- Distinguish Text/Binary-IO for Reader/Writer classes. (#1585)
- Convert setup.py to pyproject.toml (#1592)
- activate ruff pycodestyle checks (#1602)
- Update linter instructions in development.rst (#1603)
- remove unnecessary script files (#1604)
- BigEndian test fixes (#1625)
- align
ID:
in can.Message string (#1635) - Use same configuration file as Linux on macOS (#1657)
- We do not need to account for drift when we
USE_WINDOWS_EVENTS
(#1666, #1679) - Update linters, activate more ruff rules (#1669)
- Add Python 3.12 Support / Test Python 3.12 (#1673)
4.3.0rc0
Breaking Changes
Bug Fixes
- Vector: channel detection fails, if there is an active flexray channel (#1634)
- ixxat: Fix exception in 'state' property on bus coupling errors (#1647)
- NeoVi: Fixed serial number range (#1650)
- PCAN: Fix timestamp offset due to timezone (#1651)
- Catch
pywintypes.error
in broadcast manager (#1659) - Fix BLFReader error for incomplete or truncated stream (#1662)
- PCAN: remove Windows registry check to fix 32bit compatibility (#1672)
- Vector: Skip the
can_op_mode check
if the device reportscan_op_mode=0
(#1678)
Features
API
- Add
modifier_callback
parameter toBusABC.send_periodic
for auto-modifying cyclic tasks (#703) - Add
protocol
property to BusABC to determine active CAN Protocol (#1532) - Change Bus constructor implementation and typing (#1557)
- Add optional
strict
parameter to relax BitTiming & BitTimingFd Validation (#1618) - Add
BitTiming.iterate_from_sample_point
static methods (#1671)
IO
- Can Player compatibility with interfaces that use additional configuration (#1610)
Interface Improvements
- Kvaser: Add BitTiming/BitTimingFd support to KvaserBus (#1510)
- Ixxat: Implement
detect_available_configs
for the Ixxat bus. (#1607) - NeoVi: Enable send and receive on network ID above 255 (#1627)
- Vector: Send HighPriority Message to flush Tx buffer (#1636)
- PCAN: Optimize send performance (#1640)
- PCAN: Support version string of older PCAN basic API (#1644)
- Kvaser: add parameter exclusive and
override_exclusive
(#1660)
Miscellaneous
- Distinguish Text/Binary-IO for Reader/Writer classes. (#1585)
- Convert setup.py to pyproject.toml (#1592)
- activate ruff pycodestyle checks (#1602)
- Update linter instructions in development.rst (#1603)
- remove unnecessary script files (#1604)
- BigEndian test fixes (#1625)
- align
ID:
in can.Message string (#1635) - Use same configuration file as Linux on macOS (#1657)
- We do not need to account for drift when we
USE_WINDOWS_EVENTS
(#1666, #1679) - Update linters, activate more ruff rules (#1669)
- Add Python 3.12 Support / Test Python 3.12 (#1673)