From 8a09725764be9a1b5f7427ce99ee2e325f848c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Luc=20Tessier=20Gagn=C3=A9?= Date: Fri, 3 May 2019 10:19:23 -0400 Subject: [PATCH 1/8] Adding CAN FD 64 frame support to blf reader --- can/io/blf.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/can/io/blf.py b/can/io/blf.py index 059da5ec9..d162fdebc 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -66,6 +66,13 @@ class BLFParseError(Exception): # valid data bytes, data CAN_FD_MSG_STRUCT = struct.Struct(" Date: Tue, 14 May 2019 13:54:25 -0700 Subject: [PATCH 2/8] Update installation instructions (#583) Change the old reference to the Mercurial repository hosted on BitBucket to the Git repository. In addition, update the pywin32 extension URL, as the project is now managed on GitHub. --- doc/installation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/installation.rst b/doc/installation.rst index add0f5cec..147b27b74 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -50,7 +50,7 @@ available, the times are returned as number of seconds from system startup. To install the uptime library, run ``pip install uptime``. This library can take advantage of the `Python for Windows Extensions -`__ library if installed. +`__ library if installed. It will be used to get notified of new messages instead of the CPU intensive polling that will otherwise have be used. @@ -83,7 +83,7 @@ Installing python-can in development mode ----------------------------------------- A "development" install of this package allows you to make changes locally -or pull updates from the Mercurial repository and use them without having to +or pull updates from the Git repository and use them without having to reinstall. Download or clone the source repository then: :: From 22a8726c4125a6454c3dece61f9f21b6b5851742 Mon Sep 17 00:00:00 2001 From: Karl Date: Wed, 15 May 2019 17:10:58 -0700 Subject: [PATCH 3/8] Clean up bits generator TODO in PCAN interface Remove the TODO to document how the bits generator works in the PCAN interface by adding documentation and renaming the variables to make things more clear. --- can/interfaces/pcan/pcan.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/can/interfaces/pcan/pcan.py b/can/interfaces/pcan/pcan.py index e3d70eadf..864308bab 100644 --- a/can/interfaces/pcan/pcan.py +++ b/can/interfaces/pcan/pcan.py @@ -216,11 +216,17 @@ def _get_formatted_error(self, error): """ def bits(n): - """TODO: document""" + """ + Iterate over all the set bits in `n`, returning the masked bits at + the set indices + """ while n: - b = n & (~n+1) - yield b - n ^= b + # Create a mask to mask the lowest set bit in n + mask = (~n + 1) + masked_value = n & mask + yield masked_value + # Toggle the lowest set bit + n ^= masked_value stsReturn = self.m_objPCANBasic.GetErrorText(error, 0) if stsReturn[0] != PCAN_ERROR_OK: From 2a30f2519873b80909b1bb6c415e69d184d42501 Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Sat, 18 May 2019 08:46:52 +1000 Subject: [PATCH 4/8] update wheel package before deploy --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index b45e17d95..bcd18033a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,8 @@ jobs: - stage: deploy name: "PyPi Deployment" python: "3.7" + before_install: + - travis_retry pip install -U wheel setuptools deploy: provider: pypi user: hardbyte From ad3f830d6057d037a80f24e5ba25a9c3cf794529 Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Sat, 18 May 2019 09:14:08 +1000 Subject: [PATCH 5/8] Minor version bump and doc update --- can/__init__.py | 2 +- doc/development.rst | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/can/__init__.py b/can/__init__.py index a612363ae..4057322dd 100644 --- a/can/__init__.py +++ b/can/__init__.py @@ -8,7 +8,7 @@ import logging -__version__ = "3.2.0" +__version__ = "3.2.1-alpha.2" log = logging.getLogger('can') diff --git a/doc/development.rst b/doc/development.rst index 602e4e347..fdb5bcf25 100644 --- a/doc/development.rst +++ b/doc/development.rst @@ -73,8 +73,10 @@ The modules in ``python-can`` are: +---------------------------------+------------------------------------------------------+ -Creating a new Release ----------------------- +Process for creating a new Release +---------------------------------- + +Note many of these steps are carried out by the CI system on creating a tag in git. - Release from the ``master`` branch. - Update the library version in ``__init__.py`` using `semantic versioning `__. @@ -84,8 +86,9 @@ Creating a new Release - For larger changes update ``doc/history.rst``. - Sanity check that documentation has stayed inline with code. - Create a temporary virtual environment. Run ``python setup.py install`` and ``python setup.py test``. +- Ensure the ``setuptools`` and ``wheel`` tools are up to date: ``pip install -U setuptools wheel``. - Create and upload the distribution: ``python setup.py sdist bdist_wheel``. -- Sign the packages with gpg ``gpg --detach-sign -a dist/python_can-X.Y.Z-py3-none-any.whl``. +- [Optionally] Sign the packages with gpg ``gpg --detach-sign -a dist/python_can-X.Y.Z-py3-none-any.whl``. - Upload with twine ``twine upload dist/python-can-X.Y.Z*``. - In a new virtual env check that the package can be installed with pip: ``pip install python-can==X.Y.Z``. - Create a new tag in the repository. From a91ca251a63c7eb70dbc2c2109bed9faad16e4ab Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Tue, 25 Jun 2019 09:45:42 +1000 Subject: [PATCH 6/8] Minor version bump to v3.2.1 --- can/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/can/__init__.py b/can/__init__.py index 4057322dd..d2ca9208c 100644 --- a/can/__init__.py +++ b/can/__init__.py @@ -8,7 +8,7 @@ import logging -__version__ = "3.2.1-alpha.2" +__version__ = "3.2.1" log = logging.getLogger('can') From 667278ece35edf6460996e6f9186db59d8692ccb Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Tue, 25 Jun 2019 09:48:03 +1000 Subject: [PATCH 7/8] Update changelog for v3.2.1 --- CHANGELOG.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2f50dca8d..a69ddf91c 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,12 @@ -Version 3.2.0 +Version 3.2.1 ==== +* CAN FD 64 frame support to blf reader +* Minor fix to use latest tools when building wheels on travis. +* Updates links in documentation. + +Version 3.2.0 +==== Major features -------------- From a0f0ea750fe36df01261486e9b11db5e9a7a3f9a Mon Sep 17 00:00:00 2001 From: Brian Thorne Date: Thu, 27 Jun 2019 11:11:36 +1000 Subject: [PATCH 8/8] Update version to v3.3.0 Add notes to changelog. --- CHANGELOG.txt | 7 ++++--- can/__init__.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a69ddf91c..8d15e2170 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,10 @@ -Version 3.2.1 +Version 3.3.0 ==== -* CAN FD 64 frame support to blf reader +* Adding CAN FD 64 frame support to blf reader +* Updates to installation instructions +* Clean up bits generator in PCAN interface #588 * Minor fix to use latest tools when building wheels on travis. -* Updates links in documentation. Version 3.2.0 ==== diff --git a/can/__init__.py b/can/__init__.py index d2ca9208c..10245b220 100644 --- a/can/__init__.py +++ b/can/__init__.py @@ -8,7 +8,7 @@ import logging -__version__ = "3.2.1" +__version__ = "3.3.0" log = logging.getLogger('can')