NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2235 most downloaded on PyPI
Controller Area Network interface module for Python
Last release 1 years ago
12 Aug 2025
Release timing varies
gaps range from 2 weeks to 8 months
Most releases are documented
notes for 26 of 33 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
75 releases · first in 2015
Fix initialisation of an slcan bus, when setting a bitrate. When using CAN 2.0 (not FD), the default setting for data_bitrate was invalid, causing an
🆕 New CLI tool : can_bridge — bridge two physical CAN buses in software via python -m can.bridge .
can_bridge — bridge two physical CAN buses in software via python -m can.bridge.serial interface.slcan for CANable 2.0 devices.socketcand interface.TRCReader.udp_multicast interface on Windows.Notifier.find_instances(bus) to discover active Notifiers.can.cli.add_bus_arguments and can.cli.create_bus_from_namespace for downstream packages to easily configure and parse python-can bus options.serial interface. (#1758)Notifier, plus Notifier.find_instances(bus). (#1890)udp_multicast interface. (#1914)slcan according to CANable 2.0 implementation. (#1920)socketcand interface. (#1941)serial interface. (#1948)can.cli.add_bus_arguments and can.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)TRCReader. (#1953)python-can-candle package in the plugin interface section of the documentation. (#1954)python -m can.bridge (or just can_bridge) to create a software bridge between two physical buses. (#1961)socketcan interface. (#1851)gs_usb extra dependency to gs-usb. (#1945)lint, docs and test. (#1945)zlgcan-driver-py to zlgcan. (#1946)detect_available_configs() to reduce runtime and add timeout parameter. (#1947)can.Bus() instantiation. Use the --bus-kwargs argument instead. (#1949)can.io.generic.BaseIOHandler class. Improve can.io.* type annotations by using typing.Generic. (#1951)slcanBus.get_version() and slcanBus.get_serial_number(): If any other data was received during the function call, then None was returned. (#1904)BlfReader. (#1906)kvaser interface and receive_own_messages=True. (#1908)BlfWriter. (#1921)BlfReader. (#1927)ixxat interface. (#1934)ioctl function call to allow usage of the udp_multicast interface on MacOS. (#1940)state bus parameter. (#1957)Mf4Reader: support non-standard CAN_DataFrame.Dir values in mf4 files created by ihedvall/mdflib. (#1967)Message.channel attribute in PcanBus.recv(). (#1969)One column per quarter.
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. Improve can.io.* type annotations by using typing.Generic. (1951)
Support 11-bit identifiers in the serial interface. (1758)
Keep track of active Notifiers and make Notifier usable as a context manager. Add function Notifier.find_instances(bus) to find the active Notifier for a given bus instance. (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 and can.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 just can_bridge) to create a software bridge between two physical buses. (1961)
Allow sending Classic CAN frames with a DLC value larger than 8 using the socketcan interface. (1851)
The gs_usb extra dependency was renamed to gs-usb. The lint extra dependency was removed and replaced with new PEP 735 dependency groups lint, docs and test. (1945)
Update dependency name from zlgcan-driver-py to zlgcan. (1946)
Use ThreadPoolExecutor in detect_available_configs() to reduce runtime and add timeout parameter. (1947)
Update contribution guide. (1960)
Fix a bug in slcanBus.get_version() and slcanBus.get_serial_number(): If any other data was received during the function call, then None was returned. (1904)
Fix incorrect padding of CAN FD payload in BlfReader. (1906)
Set correct message direction for messages received with kvaser interface and receive_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 the udp_multicast interface on MacOS. (1940)
Fix configuration file parsing for the state bus parameter. (1957)
Mf4Reader: support non-standard CAN_DataFrame.Dir values in mf4 files created by ihedvall/mdflib. (1967)
PcanBus: Set Message.channel attribute in PcanBus.recv(). (1969)
gs_usb command-line support (and documentation updates and stability fixes) by @BenGardiner in #1790
gs_usb command-line support (and documentation updates and stability fixes) (1790)
Faster and more general MF4 support (1892)
ASCWriter speed improvement (1856)
Faster Message string representation (1858)
Added Netronic's CANdo and CANdoISO adapters interface (1887)
Add autostart option to BusABC.send_periodic() to fix issue 1848 (1853)
Improve TestBusConfig (1804)
Improve speed of TRCReader (1893)
Fix Kvaser timestamp (1878)
Set end_time in ThreadBasedCyclicSendTask.start() (1871)
Fix regex in _parse_additional_config() (1868)
Fix for 1849 (PCAN fails when PCAN_ERROR_ILLDATA is read via ReadFD) (1850)
Period must be >= 1ms for BCM using Win32 API (1847)
Fix ASCReader Crash on "Start of Measurement" Line (1811)
Resolve AttributeError within NicanError (1806)
Fix CI (1889)
Update msgpack dependency (1875)
Add tox environment for doctest (1870)
Use typing_extensions.TypedDict on python < 3.12 for pydantic support (1845)
Replace PyPy3.8 with PyPy3.10 (1838)
Fix slcan tests (1834)
Test on Python 3.13 (1833)
Stop notifier in examples (1814)
Use setuptools_scm (1810)
Added extra info for Kvaser dongles (1797)
Socketcand: show actual response as well as expected in error (1807)
Refactor CLI filter parsing, add tests (1805)
Add zlgcan to docs (1839)
Remove abstractmethod decorator from Listener.stop() ( #1770 , #1795 )
abstractmethod decorator from Listener.stop() (#1770, #1795)SizedRotatingLogger file suffix bug (#1792, #1793)BitTiming class internally to configure bitrate (#1747, #1748)PcanBus._detect_available_configs() (#1767)SocketcanBus.__init__() (#1771)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 forma
The release also includes various other minor enhancements and bug fixes aimed at improving the reliability and performance of the software.
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 forma
The release also includes various other minor enhancements and bug fixes aimed at improving the reliability and performance of the software.
Nothing published for this version
Fix socketcand erroneously discarding frames
This is a bugfix release.
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
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.
pywintypes.error in broadcast manager (#1659)can_op_mode check if the device reports can_op_mode=0 (#1678)detect_available_configs might raise XL_ERR_INVALID_CHANNEL_MASK error (#1681)modifier_callback parameter to BusABC.send_periodic for auto-modifying cyclic tasks (#703)protocol property to BusABC to determine active CAN Protocol (#1532)strict parameter to relax BitTiming & BitTimingFd Validation (#1618)BitTiming.iterate_from_sample_point static methods (#1671)detect_available_configs for the Ixxat bus. (#1607)override_exclusive (#1660)tcp_tune to reduce latency (#1683)ID: in can.Message string (#1635)USE_WINDOWS_EVENTS (#1666, #1679)Raise Minimum Python Version to 3.8
pywintypes.error in broadcast manager (#1659)can_op_mode check if the device reports can_op_mode=0 (#1678)modifier_callback parameter to BusABC.send_periodic for auto-modifying cyclic tasks (#703)protocol property to BusABC to determine active CAN Protocol (#1532)strict parameter to relax BitTiming & BitTimingFd Validation (#1618)BitTiming.iterate_from_sample_point static methods (#1671)detect_available_configs for the Ixxat bus. (#1607)override_exclusive (#1660)ID: in can.Message string (#1635)USE_WINDOWS_EVENTS (#1666, #1679)Fix socketcan KeyError (#1598, #1599).
The ASCWriter now logs the correct channel for error frames (#1578, #1583).
The bustype parameter of can.Bus is deprecated and will be removed in version 5.0, use interface instead. (#1462).
The can.BitTiming class was replaced with the new can.BitTiming and can.BitTimingFd classes (#1468, #1515).
Early adopters of can.BitTiming will need to update their code. Check the documentation for more information. Currently, the following interfaces support the new classes:
There are open pull requests for kvaser (#1510), slcan (#1512) and usb2can (#1511). Testing and reviewing of these open PRs would be most appreciated.
__del__ method to can.BusABC to automatically release resources (#1489, #1564).find_available_interfaces (#1478).Bus.__new__ for CAN-FD interfaces (#1458, #1460).bustype parameter of can.Bus is deprecated and will be
removed in version 5.0, use interface instead. (#1462).context parameter of can.Bus is deprecated and will be
removed in version 5.0, use config_context instead. (#1474).bit_timing parameter of CantactBus is deprecated and will be
removed in version 5.0, use timing instead. (#1468).bit_timing parameter of CANalystIIBus is deprecated and will be
removed in version 5.0, use timing instead. (#1468).brs and log_errors parameters of NiXNETcanBus are deprecated
and will be removed in version 5.0. (#1520).The entry_points().get deprecation warning and improve
type annotation of can.interfaces.BACKENDS (#1465).ignore_config parameter to can.Bus (#1474).deprecated_args_alias (#1477).ruff to the CI system (#1551)The bustype parameter of can.Bus is deprecated and will be removed in version 5.0, use interface instead. (#1462).
This is a pre-release of version 4.2.0, which will be the last version to support Python 3.7.
pip install python-can==4.2.0rc0
The can.BitTiming class was replaced with the new
can.BitTiming and can.BitTimingFd classes (#1468, #1515).
Early adopters of can.BitTiming will need to update their code. Check the
documentation for more information.
Currently, the following interfaces support the new classes:
There are open pull requests for kvaser (#1510), slcan (#1512) and usb2can (#1511). Testing and reviewing of these open PRs would be most appreciated.
__del__ method to can.BusABC to automatically release resources (#1489).find_available_interfaces (#1478).Bus.__new__ for CAN-FD interfaces (#1458, #1460).bustype parameter of can.Bus is deprecated and will be
removed in version 5.0, use interface instead. (#1462).context parameter of can.Bus is deprecated and will be
removed in version 5.0, use config_context instead. (#1474).bit_timing parameter of CantactBus is deprecated and will be
removed in version 5.0, use timing instead. (#1468).bit_timing parameter of CANalystIIBus is deprecated and will be
removed in version 5.0, use timing instead. (#1468).brs and log_errors parameters of NiXNETcanBus are deprecatedThe entry_points().get deprecation warning and improve
type annotation of can.interfaces.BACKENDS (#1465).ignore_config parameter to can.Bus (#1474).deprecated_args_alias (#1477).ruff to the CI system (#1551)Available on PyPi https://pypi.org/project/python-can/4.1.0/
Available on PyPi https://pypi.org/project/python-can/4.1.0/
pip install python-can==4.1.0
windows-curses was moved to optional dependencies (#1395).
Use pip install python-can[viewer] if you are using the can.viewer
script on Windows.can.interfaces.vector.VectorChannelConfig were renamed
from camelCase to snake_case (#1422).can.logger script accepts the -a, --append option
to add new data to an existing log file (#1326, #1327, #1361).
Currently only the blf-, canutils- and csv-formats are supported.extra_args are passed to the bus, logger
and player initialisation (#1366).py.typed marker to support type checking
according to PEP 561 (#1344).is_rx flag (#1270).find_available_interfaces() find slcanX interfaces (#1369).VectorBus.__init__ (#1426).writer.stop() call that throws error (#1316, #1317).extra_args (#1280, #1328).Nothing published for this version
Test of whether Github actions will upload to pypi
Test of whether Github actions will upload to pypi
Fix guaranteed crash when using usb2can by @felixdivo in https://github.com/hardbyte/python-can/pull/1249
can.logger to consider the append option by @j-c-cook in https://github.com/hardbyte/python-can/pull/1327file_size help doc string by @j-c-cook in https://github.com/hardbyte/python-can/pull/1401…or are more explicit. While we did try to avoid breaking changes, in some cases it was not feasible and in particular, many implementation details hav…
TL;DR: This release includes a ton of improvements from 2.5 years of development! 🎉 Test thoroughly after switching.
For more than two years, there was no major release of python-can. However, development was very much active over most of this time, and many parts were switched out and improved. Over this time, over 530 issues and PRs have been resolved or merged, and discussions took place in even more. Statistics of the final diff: About 200 files changed due to ~22k additions and ~7k deletions from more than thirty contributors.
This changelog diligently lists the major changes but does not promise to be the complete list of changes. Therefore, users are strongly advised to thoroughly test their programs against this new version. Re-reading the documentation for your interfaces might be helpful too as limitations and capabilities might have changed or are more explicit. While we did try to avoid breaking changes, in some cases it was not feasible and in particular, many implementation details have changed.
A massive thank you to Felix Divo for preparing this release, and to the many many contributors.
sdist) and binary wheels (bdist_wheel) (#1059, #1071)This is the first release candidate for version 4.0.0. It includes a ton of improvements from 2.5 years of development! :tada:
This is the first release candidate for version 4.0.0. It includes a ton of improvements from 2.5 years of development! :tada:
Test thoroughly after switching and please report any issues that you experience while testing this pre-release.
Also, have a look at the complete CHANGELOG.
The documentation of the develop branch can be viewed here.
Development release of python-can 4.0.0.
Development release of python-can 4.0.0.
Development release of python-can 4.0.0.
Development release of python-can 4.0.0.
Last planned release with Python2 support! :fireworks:
Last planned release with Python2 support! :fireworks:
Last call for Python2 support.
850 Fix socket.error is a deprecated alias of OSError used on Python versions lower than 3.3.
Last call for Python2 support. * #850 Fix socket.error is a deprecated alias of OSError used on Python versions lower than 3.3. * #846 Use inter-proce
Last call for Python2 support.
Backported fixes from 4.x development branch which targets Python 3.
Backported fixes from 4.x development branch which targets Python 3.
Note you will need setuptools version 36.2.2 or later.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Backported fixes from Python 3 only 4.x development.
Backported fixes from Python 3 only 4.x development.
Minor bug fix release addressing issue in PCAN RTR.
Minor bug fix release addressing issue in PCAN RTR.
Released with tag pointing at correct commit this time.
Minor fix to setup.py to only require pytest-runner when necessary.
Minor fix to setup.py to only require pytest-runner when necessary.
Adding CAN FD 64 frame support to blf reader
CAN FD 64 frame support to blf reader
Nothing published for this version
Nothing published for this version
FD support added for Pcan by @bmeisels with input from @markuspi, @christiansandberg & @felixdivo in PR #537
General fixes, cleanup and docs changes can be found here.
Pulls: #522, #526, #527, #536, #540, #546, #547, #548, #533, #559, #569, #571, #572, #575
_detect_available_configs() APIPulls #511, #535
app_name. #525FD support added for Pcan by @bmeisels with input from @markuspi, @christiansandberg & @felixdivo in PR 537
This is the last version of python-can which will support Python 2.7 and Python 3.5. Support has been removed for Python 3.4 in this release in PR 532
533 BusState is now an enum.
535 This release should automatically be published to PyPi by travis.
577 Travis-ci now uses stages.
548 A guide has been added for new io formats.
550 Finish moving from nose to pytest.
558 Fix installation on Windows.
561 Tests for MessageSync added.
General fixes, cleanup and docs changes can be found on the GitHub milestone https://github.com/hardbyte/python-can/milestone/7?closed=1
Pulls: 522, 526, 527, 536, 540, 546, 547, 548, 533, 559, 569, 571, 572, 575
FD
ability to set custom can speed instead of using predefined speed values. 553
Bug fix to properly support 32bit systems. 573
slightly better error handling
multiple serial devices can be found
support for the _detect_available_configs() API
Pulls 511, 535
handle app_name. 525
FD support added for Pcan by @bmeisels with input from @markupspi, @christiansandberg & @felixdivo in PR #537
General fixes, cleanup and docs changes can be found here.
Pulls: #522, #526, #527, #536, #540, #546, #547, #548, #533, #559, #569, #571, #572, #575
_detect_available_configs() APIPulls #511, #535
app_name. #525Nothing published for this version
Nothing published for this version
Nothing published for this version
Same as 3.1.0 but built with Python 3.7 and up dated setuptools, wheel etc
Same as 3.1.0 but built with Python 3.7 and up dated setuptools, wheel etc
Two new interfaces this release:
SYSTEC contributed by @idaniel86 in PR 466
CANalyst-II contributed by @smeng9 in PR 476
477 The kvaser interface now supports bus statistics via a custom bus method.
434 neovi now supports receiving own messages
490 Adding option to override the neovi library name
488 Allow simultaneous access to IXXAT cards
447 Improvements to serial interface:
to allow receiving partial messages
to fix issue with DLC of remote frames
addition of unit tests
497 Small API changes to Message and added unit tests
471 Fix CAN FD issue in kvaser interface
462 Fix Notifier issue with asyncio
481 Fix PCAN support on OSX
455 Fix to Message initializer
Small bugfixes and improvements
Nothing published for this version
Two new interfaces this release:
Two new interfaces this release:
Message and added unit testsNotifier issue with asyncioMessage initializerVersion 3.1.0 was built with old wheel and/or setuptools packages and was replaced with v3.1.1 after an installation but was discovered.
SYSTEC contributed by @idaniel86 in PR #466
Notifier issue with asyncio.Message initializer.See all the merged pull requests here.
Deprecated python_can.interface entry point instead use can.interface. #389
asyncio applications with python-can more easily. This can be useful
when implementing protocols that handles simultaneous connections to many nodes since you can write
synchronous looking code without handling multiple threads and locking mechanisms. #388Bus. By default tasks created with
bus.send_periodic will have a reference held by the bus - this means in many cases the user
doesn't need to keep the task in scope for their periodic messages to continue being sent. If
this behavior isn't desired pass store_task=False to the send_periodic method. Stop all tasks
by calling the bus's new stop_all_periodic_tasks method. #412send_periodic and instead implement
_send_periodic_internal #426Listener.on_message_received() is now abstract (using @abc.abstractmethod)file, and not in
something like fp, log_file or output_file. Changed the name of the first parameter of the
read/writer constructors from filename to file.python_can.interface entry point instead use can.interface. #389flush_tx_buffer. #364serial_for_url enabling using remote ports via loop://, ``socket://andrfc2217://` URLs. #393rtscts kwarg #402_detect_available_configs. #362BaseIOHandlerstop() methodSqliteReader/SqliteWriter can be adjustedCSVWriter and CanutilsLogWriter__ne__() method to the Message class (this was required by the tests)stop() method for BufferedReaderSqliteWriter: this now guarantees that all messages are being written, exposes some previously internal metrics
and only buffers messages up to a certain limit before writing/committing to the database.header_line attribute from CSVReader has been removedcan/scripts. #370, #406General fixes, cleanup and docs changes: (#347, #348, #367, #368, #370, #371, #373, #420, #417, #419)
Documentation: https://python-can.readthedocs.io/en/3.0.0/
pip install python-can==3.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix errors and warnings when importing library on Windows
Get it from PyPi:
pip install -U python-can==2.2.1
Deprecated the old CAN module, please use the newer can entry point (will be removed in version 2.4). #267
socketcan_native and socketcan_ctypes), this is now completely transparent for the library user. #326CAN module, please use the newer can entry point (will be removed in version 2.4). #267There were many changes and a lot of cleanup effort in the individual interfaces. Some of the highlights:
Use socketcan in the future instead of socketcan_native or socketcan_ctypes
Use configured bitrate. #254
Show stopping bug #219 has been fixed.
can.Notifier adding add_listener and remove_listener methods #266SqlReader and SqlWriter have been renamed to SqliteReader and SqliteWriter. #263Get it from PyPi:
pip install -U python-can==2.2.0
Fallback message filtering implemented in Python for interfaces that don't offer better accelerated mechanism.
SocketCAN interfaces have been merged (Now use socketcan instead of either socketcan_native and socketcan_ctypes), this is now completely transparent for the library user.
automatic detection of available configs/channels in supported interfaces.
Added synchronized (thread-safe) Bus variant.
context manager support for the Bus class.
Dropped support for Python 3.3 (officially reached end-of-life in Sept. 2017)
Deprecated the old CAN module, please use the newer can entry point (will be removed in an upcoming major version)
Nothing published for this version
Support for out of tree can interfaces with pluggy.
Available in all good cheese shops:
pip install python-can==2.1.0
Documentation available on readthedocs.
Your coding agent can read these notes before it upgrades. Set up the MCP server →