Skip to content

Release 3.3.3 #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
May 22, 2020
Merged

Release 3.3.3 #715

merged 24 commits into from
May 22, 2020

Conversation

hardbyte
Copy link
Owner

@hardbyte hardbyte commented Oct 24, 2019

What else needs to be backported to a 3.x release?

craffert0 and others added 4 commits August 15, 2019 20:58
In `PcanBus.send()`, we initially set `msgType` based on all the flags of `msg`, including RTR. In the if/else for `self.fd`, we are incorrectly resetting it if rtr. We should not, and so we are no longer doing it.
@codecov
Copy link

codecov bot commented Oct 24, 2019

Codecov Report

Merging #715 into master will decrease coverage by 0.21%.
The diff coverage is 43.63%.

@@            Coverage Diff             @@
##           master     #715      +/-   ##
==========================================
- Coverage   64.79%   64.58%   -0.22%     
==========================================
  Files          63       63              
  Lines        5786     5822      +36     
==========================================
+ Hits         3749     3760      +11     
- Misses       2037     2062      +25     

@karlding
Copy link
Collaborator

karlding commented Oct 25, 2019

Looking through the merged PRs I think these would also be candidates for backports as these were all bug fixes?

Up to you what ultimately makes it, since IMO there isn't really much distinction between a fix for a bug and a resulting enhancement in some cases. Do we only take changes if they cause crashes or are obviously wrong behaviour?

Also, not sure if we should take the various docs changes that went in?

Note: Just a random thought, but it might be easier to do this in the future if we switched to a Merge Squash workflow (or required PR commits to be squashed before merging), so we could just refer to the git commit history.

@karlding
Copy link
Collaborator

karlding commented Nov 13, 2019

hardbyte and others added 7 commits December 29, 2019 08:35
Skip J1939TP messages
Expose options to send or skip error frame messages
Currently bus.send_periodic blindly wraps the BCM socket API, and sends
a BCM operation with the TX_SETUP opcode. However, the semantics that
the kernel driver provides are an "upsert". As such, when one attempts
to create two Tasks with the same CAN Arbitration ID, it ends up
silently modifying the periodic messages, which is contrary to what our
API implies.

This fixes the problem by first sending a TX_READ opcode with the CAN
Arbitration ID that we wish to create. The kernel driver will return
-EINVAL if a periodic transmission with the given Arbitration ID does
not exist. If this is the case, then we can continue creating the Task,
otherwise we error and notify the user.

#605
Pass kwargs through to BusABC's initializer.

Doesn't backport changing baud to bitrate to avoid changing the API
* pin versions of testing dependencies including coverage
@hardbyte
Copy link
Owner Author

Thanks @karlding, I certainly agree that if each feature had been squashed it would have made this backporting easier!

@hardbyte hardbyte requested a review from karlding December 30, 2019 22:12
@karlding
Copy link
Collaborator

Sorry, just getting back into things after vacation. Should we also backport #740?

@karlding
Copy link
Collaborator

Did we ever end up resolving or making any progress on figuring out what was going on with people reporting broken releases? Was this just due to incompatible pip versions, or was there actually some packaging issue?

@christiansandberg
Copy link
Collaborator

#628 please.

@hardbyte
Copy link
Owner Author

hardbyte commented Feb 17, 2020

Did we ever end up resolving or making any progress on figuring out what was going on with people reporting broken releases? Was this just due to incompatible pip versions, or was there actually some packaging issue?

I think one issue was solved where python-can was packaged using old versions of setuptools and/or wheel. There was another regarding pytest-runner which I think was solved. Finally #593 was a problem with a Windows only dependency - windows-curses causing grief on non Windows machines.

@drchopper
Copy link

drchopper commented Mar 3, 2020

Did we ever end up resolving or making any progress on figuring out what was going on with people reporting broken releases? Was this just due to incompatible pip versions, or was there actually some packaging issue?

I think one issue was solved where python-can was packaged using old versions of setuptools and/or wheel. There was another regarding pytest-runner which I think was solved. Finally #593 was a problem with a Windows only dependency - windows-curses causing grief on non Windows machines.

No, still issues installing python-can 3.3.2 using Python 2.7.12 + pip (20.0.2) on Ubuntu 16.04 LTS due to the following issue:

python -m pip install python-can==3.3.2

--> ERROR: Could not find a version that satisfies the requirement windows-curses

@hardbyte
Copy link
Owner Author

Hi @drchopper just had a look at install this release branch on Ubuntu with Python 2 and it seems to work:

brian@red-nzxt:~/tmp/python-can-333-test$ python -m virtualenv venv2
created virtual environment CPython2.7.17.final.0-64 in 153ms
brian@red-nzxt:~/tmp/python-can-333-test$ source venv2/bin/activate
(venv2) brian@red-nzxt:~/tmp/python-can-333-test$ pip install -U setuptools wheel
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: setuptools in ./venv2/lib/python2.7/site-packages (44.1.0)
Requirement already up-to-date: wheel in ./venv2/lib/python2.7/site-packages (0.34.2)
(venv2) brian@red-nzxt:~/tmp/python-can-333-test$ pip install -U git+git://github.com/hardbyte/[email protected]#egg=python-can
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting python-can
  Cloning git://github.com/hardbyte/python-can (to revision release-3.3.3) to /tmp/pip-install-KlVF8J/python-can
  Running command git clone -q git://github.com/hardbyte/python-can /tmp/pip-install-KlVF8J/python-can
  Running command git checkout -b release-3.3.3 --track origin/release-3.3.3
  Switched to a new branch 'release-3.3.3'
  Branch 'release-3.3.3' set up to track remote branch 'release-3.3.3' from 'origin'.
Collecting wrapt~=1.10
  Using cached wrapt-1.12.1.tar.gz (27 kB)
Collecting aenum
  Downloading aenum-2.2.3-py2-none-any.whl (33 kB)
Collecting typing
  Using cached typing-3.7.4.1-py2-none-any.whl (26 kB)
Building wheels for collected packages: python-can, wrapt
  Building wheel for python-can (setup.py) ... done
  Created wheel for python-can: filename=python_can-3.3.3-py2.py3-none-any.whl size=153338 sha256=e91bc5aa3a5cf839f35d94f6be2b7b7ae801105fec9c9980245c93a2ba76ee5f
  Stored in directory: /tmp/pip-ephem-wheel-cache-mvuduK/wheels/80/e6/d8/a4d8b6668540adbabb33fc0fedebed936a3233d72c120d9232
  Building wheel for wrapt (setup.py) ... done
  Created wheel for wrapt: filename=wrapt-1.12.1-cp27-cp27mu-linux_x86_64.whl size=50514 sha256=2f3f2d6ddef76649c26e4ac5b2860d497dafccf35dba70a96ede541a04e1e2bb
  Stored in directory: /home/brian/.cache/pip/wheels/5b/d8/8e/81a83cb5321b940a954996f5b57fddc8976e712b3ac3a1a54b
Successfully built python-can wrapt
Installing collected packages: wrapt, aenum, typing, python-can
Successfully installed aenum-2.2.3 python-can-3.3.3 typing-3.7.4.1 wrapt-1.12.1

Do you want to try install the 3.3.3 version with pip install -U git+git://github.com/hardbyte/[email protected]#egg=python-can

@hardbyte
Copy link
Owner Author

hardbyte commented Apr 19, 2020

I've tagged an alpha release to try on various platforms:

  • Ubuntu Python 3.8
  • Ubuntu Python 3.7
  • Ubuntu Python 2.7
  • Windows Python 3.8
  • Windows Python 3.7
  • Windows Python 2.7
  • Raspberry Pi Linux Python 3.8
  • Raspberry Pi Linux Python 3.7
  • Raspberry Pi Linux Python 2.7

Grab it from https://pypi.org/project/python-can/3.3.3a0/ and comment if you've checked a platform.

pip install python-can==3.3.3a0

@karlding
Copy link
Collaborator

I think we should also backport #814, otherwise Python 3 support for Vector interfaces would remain broken, especially as we're now recommending people to move to Python 3.

karlding and others added 2 commits April 20, 2020 09:49
In Python 2, the str type was used for text and bytes, whereas in Python
3, these are separate and incompatible types. This broke instantiation
of a VectorBus when the app_name parameter in __init__ was set to None.

This correctly sets it to a bytes object.

Fixes #796
@karlding
Copy link
Collaborator

Sorry for potentially needing to cut a new release, but while looking through the open issues, I found another candidate for backporting, which addresses 771:

 → TITANIC@python-can (develop) $ git show 4033a621ec2f530ea168a7f1b6dc6fb0a6a88c11 can/io/csv.py
commit 4033a621ec2f530ea168a7f1b6dc6fb0a6a88c11
Author: Felix Divo <[email protected]>
Date:   Sun May 19 23:42:26 2019 +0200

    fix other linter stuff

diff --git a/can/io/csv.py b/can/io/csv.py
index 8bafdf1..c755b1c 100644
--- a/can/io/csv.py
+++ b/can/io/csv.py
@@ -89,7 +89,11 @@ class CSVReader(BaseIOHandler):

     def __iter__(self):
         # skip the header line
-        next(self.file)
+        try:
+            next(self.file)
+        except StopIteration:
+            # don't crash on a file with only a header
+            return

         for line in self.file:

@hardbyte
Copy link
Owner Author

Don't worry - python-can releases haven't exactly been a rush!

@drchopper
Copy link

drchopper commented Apr 20, 2020

I've tagged an alpha release to try on various platforms:

  • Ubuntu Python 3.8
  • Ubuntu Python 3.7
  • Ubuntu Python 2.7
  • Windows Python 3.8
  • Windows Python 3.7
  • Windows Python 2.7
  • Raspberry Pi Linux Python 3.8
  • Raspberry Pi Linux Python 3.7
  • Raspberry Pi Linux Python 2.7

Grab it from https://pypi.org/project/python-can/3.3.3a0/ and comment if you've checked a platform.

pip install python-can==3.3.3a0

Tested with Ubuntu Python2.7 successfully!

@pierreluctg
Copy link
Collaborator

Can we include #798?

@karlding
Copy link
Collaborator

#741 is the fix for #816, which also seems to be missing from the branch.

@tysonite
Copy link
Contributor

Would it be possible to include #785 ?

@hardbyte
Copy link
Owner Author

hardbyte commented May 6, 2020

To avoid forever back-porting changes into this 3.3 branch, I think we call it a day and cut the release.
I've tagged a 3rd alpha:

pip install python-can==3.3.3a3

@hardbyte hardbyte requested a review from karlding May 15, 2020 22:11
@hardbyte
Copy link
Owner Author

With an approving review I'll tag the final and merge this into master

can/__init__.py Outdated
@@ -8,7 +8,7 @@

import logging

__version__ = "3.3.2"
__version__ = "3.3.3-alpha.3"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you bumping/tagging this after merging into master?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I was going to do it in this branch as I've done for the pre-releases

@hardbyte
Copy link
Owner Author

@hardbyte hardbyte merged commit 40c1aed into master May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.