Skip to content

Commit

Permalink
Merge pull request #441 from hardbyte/release-3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hardbyte authored Oct 4, 2018
2 parents d2b20ea + ed9ec6d commit 4b93f21
Show file tree
Hide file tree
Showing 114 changed files with 4,652 additions and 1,784 deletions.
22 changes: 12 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,31 @@ environment:

# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
# Python 3.0-3.3 have reached EOL

- PYTHON: "C:\\Python27"
- PYTHON: "C:\\Python34"
- PYTHON: "C:\\Python35"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python27-x64"
- PYTHON: "C:\\Python34-x64"
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python36-x64"

# Python 3.3 has reached EOL
- PYTHON: "C:\\Python37-x64"

install:
# Prepend Python installation to PATH
- set PATH=%PYTHON_INSTALL%;%PATH%

# Prepend Python scripts to PATH (e.g. py.test)
- set PATH=%PYTHON_INSTALL%\\Scripts;%PATH%
# Prepend Python installation and scripts (e.g. pytest) to PATH
- set PATH=%PYTHON_INSTALL%;%PYTHON_INSTALL%\\Scripts;%PATH%

# We need to install the python-can library itself
- "python -m pip install .[test]"
# We need to install the python-can library itself including the dependencies
- "python -m pip install .[test,neovi]"

build: off

test_script:
- "pytest -v --timeout=300"
# run tests
- "pytest"

# uplad coverage reports
- "codecov"
21 changes: 21 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Validate with curl --data-binary @.codecov.yml https://codecov.io/validate
codecov:
archive:
uploads: no

coverage:
precision: 2
round: down
range: 50...100
status:
project:
default:
# coverage may fall by <1.0% and still be considered "passing"
threshold: 1.0%
patch:
default:
# coverage may fall by <1.0% and still be considered "passing"
threshold: 1.0%

comment:
layout: "header, diff, changes"
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# https://github.com/github/gitignore/blob/da00310ccba9de9a988cc973ef5238ad2c1460e9/Python.gitignore
test/__tempdir__/
.pytest_cache/

# -------------------------
# below: https://github.com/github/gitignore/blob/da00310ccba9de9a988cc973ef5238ad2c1460e9/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
Expand All @@ -11,6 +15,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand Down
28 changes: 17 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
language: python

python:
# CPython:
# CPython; versions 3.0-3.3 have reached EOL
- "2.7"
# Python 3.3 has reached EOL and pytest fails there
- "3.4"
- "3.5"
- "3.6"
- "3.7-dev" # TODO: change to "3.7" once it is supported by travis-ci
- "nightly"
# PyPy:
- "pypy"
- "pypy3.5"
- "pypy" # Python 2.7
- "pypy3.5" # Python 3.5

os:
- linux # Linux is officially supported and we test the library under
# many different Python verions (see "python: ..." above)

# - osx # OSX + Python is not officially supported by Travis CI as of Feb. 2018
# nevertheless, "nightly" and some "*-dev" versions seem to work, so we
# include them explicitly below (see "matrix: include: ..." below)
# include them explicitly below (see "matrix: include: ..." below).
# They only seem to work with the xcode8.3 image, and not the newer ones.
# Thus we will leave this in, until it breaks one day, at which point we
# will probably reomve testing on OSX if it is not supported then.
# See #385 on Github.

# - windows # Windows is not supported at all by Travis CI as of Feb. 2018

# Linux setup
dist: trusty
sudo: false
sudo: required

matrix:
# see "os: ..." above
include:
- os: osx
osx_image: xcode8.3
python: "3.6-dev"
- os: osx
osx_image: xcode8.3
python: "3.7-dev"
- os: osx
osx_image: xcode8.3
python: "nightly"

allow_failures:
# allow all nighly builds to fail, since these python versions might be unstable
- python: "nightly"

# we do not allow dev builds to fail, since these builds are considered stable enough

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo bash test/open_vcan.sh ; fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then travis_retry pip install -r doc/doc-requirements.txt; fi
- travis_retry pip install .[test]
- travis_retry pip install sphinx

script:
- pytest -v --timeout=300
- pytest
- codecov
# Build Docs with Sphinx
#
# -a Write all files
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then python -m sphinx -an doc build; fi
# -n nitpicky
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then python -m sphinx -an doc build; fi
110 changes: 108 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,109 @@
Version 3.0.0
====

Major features
--------------

* Adds support for developing `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. #388
* New can viewer terminal application. (`python -m can.viewer`) #390
* More formally adds task management responsibility to the `Bus`. 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. #412


Breaking changes
----------------

* Interfaces should no longer override `send_periodic` and instead implement
`_send_periodic_internal` to allow the Bus base class to manage tasks. #426
* writing to closed writers is not supported any more (it was supported only for some)
* the file in the reader/writer is now always stored in the attribute uniformly called `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`.


Other notable changes
---------------------

* can.Message class updated #413
- Addition of a `Message.equals` method.
- Deprecate id_type in favor of is_extended_id
- Initializer parameter extended_id deprecated in favor of is_extended_id
- documentation, testing and example updates
- Addition of support for various builtins: __repr__, __slots__, __copy__
* IO module updates to bring consistency to the different CAN message writers and readers. #348
- context manager support for all readers and writers
- they share a common super class called `BaseIOHandler`
- all file handles can now be closed with the `stop()` method
- the table name in `SqliteReader`/`SqliteWriter` can be adjusted
- append mode added in `CSVWriter` and `CanutilsLogWriter`
- [file-like](https://docs.python.org/3/glossary.html#term-file-like-object) and
[path-like](https://docs.python.org/3/glossary.html#term-path-like-object) objects can now be passed to
the readers and writers (except to the Sqlite handlers)
- add a `__ne__()` method to the `Message` class (this was required by the tests)
- added a `stop()` method for `BufferedReader`
- `SqliteWriter`: 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.
- the unused `header_line` attribute from `CSVReader` has been removed
- privatized some attributes that are only to be used internally in the classes
- the method `Listener.on_message_received()` is now abstract (using `@abc.abstractmethod`)
* Start testing against Python 3.7 #380
* All scripts have been moved into `can/scripts`. #370, #406
* Added support for additional sections to the config #338
* Code coverage reports added. #346, #374
* Bug fix to thread safe bus. #397

General fixes, cleanup and docs changes: (#347, #348, #367, #368, #370, #371, #373, #420, #417, #419, #432)

Backend Specific Changes
------------------------

3rd party interfaces
~~~~~~~~~~~~~~~~~~~~

* Deprecated `python_can.interface` entry point instead use `can.interface`. #389

neovi
~~~~~

* Added support for CAN-FD #408
* Fix issues checking if bus is open. #381
* Adding multiple channels support. #415

nican
~~~~~

* implements reset instead of custom `flush_tx_buffer`. #364

pcan
~~~~

* now supported on OSX. #365


serial
~~~~~~

* Removed TextIOWrapper from serial. #383
* switch to `serial_for_url` enabling using remote ports via `loop://`, ``socket://` and `rfc2217://` URLs. #393
* hardware handshake using `rtscts` kwarg #402

socketcan
~~~~~~~~~

* socketcan tasks now reuse a bcm socket #404, #425, #426,
* socketcan bugfix to receive error frames #384

vector
~~~~~~

* Vector interface now implements `_detect_available_configs`. #362
* Added support to select device by serial number. #387

Version 2.2.1 (2018-07-12)
=====

Expand All @@ -14,7 +120,7 @@ Version 2.2.0 (2018-06-30)
* 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 version 2.4)
* Deprecated the old `CAN` module, please use the newer `can` entry point (will be removed in an upcoming major version)

Version 2.1.0 (2018-02-17)
=====
Expand All @@ -34,7 +140,7 @@ Version 2.0.0 (2018-01-05

After an extended baking period we have finally tagged version 2.0.0!

Quite a few major Changes from v1.x:
Quite a few major changes from v1.x:

* New interfaces:
* Vector
Expand Down
47 changes: 24 additions & 23 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
Ben Powell
Brian Thorne <[email protected]>
Geert Linders
Mark Catley
Phillip Dixon <[email protected]>
Rose Lu
Karl van Workum
Albert Bloomfield <[email protected]>
Sam Bristow
Ethan Zonca
Robert Kaye
Andrew Beal
Jonas Frid
Tynan McAuley
Bruno Pennati
Jack Jester-Weinstein
Joshua Villyard
Giuseppe Corbelli <[email protected]>
Christian Sandberg
Eduard Bröcker <[email protected]>
Boris Wenzlaff
Pierre-Luc Tessier Gagné
Felix Divo <[email protected]>
Ben Powell
Brian Thorne <[email protected]>
Geert Linders
Mark Catley
Phillip Dixon <[email protected]>
Rose Lu
Karl van Workum
Albert Bloomfield <[email protected]>
Sam Bristow
Ethan Zonca
Robert Kaye
Andrew Beal
Jonas Frid
Tynan McAuley
Bruno Pennati
Jack Jester-Weinstein
Joshua Villyard
Giuseppe Corbelli <[email protected]>
Christian Sandberg
Eduard Bröcker <[email protected]>
Boris Wenzlaff
Pierre-Luc Tessier Gagné
Felix Divo <[email protected]>
Kristian Sloth Lauszus <[email protected]>
Loading

0 comments on commit 4b93f21

Please sign in to comment.