Skip to content

Commit 3b92a35

Browse files
authored
Update to version 1.0.0 Python 3 support
Update to version 1.0.0 with support for python 3
2 parents e810183 + 1c140a2 commit 3b92a35

37 files changed

Lines changed: 478 additions & 382 deletions

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: python
22
dist: xenial
33
python:
4-
- "2.7"
4+
- "3.6.7"
55
before_install:
6-
- sudo apt-get update -qq
6+
- sudo apt-get -o Acquire::https::No-Cache=True -o Acquire::http::No-Cache=True update -qq
77
- sudo apt-get install python-bluetooth -qq -y
88
- pip install pyserial==3.1.1
99
- pip install coveralls

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
OpenXC Python Library Changelog
22
===============================
33

4+
v1.0.0
5+
----------
6+
* Remove python 2.7 support
7+
* Add python 3.6 support
8+
* Known Issue: Tool openxc-dashboard does not display correctly in windows
9+
410
v0.15.0
511
----------
612

README.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OpenXC for Python
44

55
.. image:: /docs/_static/logo.png
66

7-
:Version: 0.15.0
7+
:Version: 1.0.0
88
:Web: http://openxcplatform.com
99
:Download: http://pypi.python.org/pypi/openxc/
1010
:Documentation: http://python.openxcplatform.com
@@ -21,7 +21,7 @@ OpenXC for Python
2121
:target: http://python.openxcplatform.com
2222
:alt: Documentation Status
2323

24-
The OpenXC Python library (for Python 2.7) provides an interface to
24+
The OpenXC Python library (for Python 3.6.7) provides an interface to
2525
vehicle data from the OpenXC Platform. The primary platform for OpenXC
2626
applications is Android, but for prototyping and testing, often it is
2727
preferrable to use a low-overhead environment like Python when developing.
@@ -30,6 +30,13 @@ In addition to a port of the Android library API, the package also contains a
3030
number of command-line tools for connecting to the CAN translator and
3131
manipulating previously recorded vehicle data.
3232

33+
To package run "setup.py sdist bdist_wheel"
34+
to push to pypi run "python -m twine upload dist/*"
35+
Version files:
36+
CHANGELOG.rst
37+
README.rst
38+
openxc/version.py
39+
docs/index.rst
3340
3441
License
3542
=======

docs/conf.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
master_doc = 'index'
4141

4242
# General information about the project.
43-
project = u'OpenXC for Python'
44-
copyright = u'2017, Ford Motor Company'
43+
project = 'OpenXC for Python'
44+
copyright = '2017, Ford Motor Company'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
@@ -196,8 +196,8 @@
196196
# Grouping the document tree into LaTeX files. List of tuples
197197
# (source start file, target name, title, author, documentclass [howto/manual]).
198198
latex_documents = [
199-
('index', 'OpenXCforPython.tex', u'OpenXC for Python Documentation',
200-
u'Christopher Peplin', 'manual'),
199+
('index', 'OpenXCforPython.tex', 'OpenXC for Python Documentation',
200+
'Christopher Peplin', 'manual'),
201201
]
202202

203203
# The name of an image file (relative to this directory) to place at the top of
@@ -226,8 +226,8 @@
226226
# One entry per manual page. List of tuples
227227
# (source start file, name, description, authors, manual section).
228228
man_pages = [
229-
('index', 'openxcforpython', u'OpenXC for Python Documentation',
230-
[u'Christopher Peplin'], 1)
229+
('index', 'openxcforpython', 'OpenXC for Python Documentation',
230+
['Christopher Peplin'], 1)
231231
]
232232

233233
# If true, show URL addresses after external links.
@@ -240,8 +240,8 @@
240240
# (source start file, target name, title, author,
241241
# dir menu entry, description, category)
242242
texinfo_documents = [
243-
('index', 'OpenXCforPython', u'OpenXC for Python Documentation',
244-
u'Christopher Peplin', 'OpenXCforPython', 'One line description of project.',
243+
('index', 'OpenXCforPython', 'OpenXC for Python Documentation',
244+
'Christopher Peplin', 'OpenXCforPython', 'One line description of project.',
245245
'Miscellaneous'),
246246
]
247247

docs/index.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ OpenXC for Python
44

55
.. image:: /_static/logo.png
66

7-
:Version: 0.15.0
7+
:Version: 1.0.0
88
:Web: http://openxcplatform.com
99
:Download: http://pypi.python.org/pypi/openxc/
1010
:Documentation: http://python.openxcplatform.com
1111
:Source: http://github.com/openxc/openxc-python/
1212

13-
The OpenXC Python library (for Python 2.7) provides an interface to
13+
The OpenXC Python library (for Python 3.6) provides an interface to
1414
vehicle data from the OpenXC Platform. The primary platform for OpenXC
1515
applications is Android, but for prototyping and testing, often it is
1616
preferrable to use a low-overhead environment like Python when developing.
@@ -19,8 +19,7 @@ In addition to a port of the Android library API, the package also contains a
1919
number of command-line tools for connecting to the vehicle interface and
2020
manipulating previously recorded vehicle data.
2121

22-
This Python package works with Python 2.7. Unfortunately we had to drop
23-
support for Python 3 when we added the protobuf library as a dependency.
22+
This Python package works with Python 3.6. For python 2.7 support use version 0.15.0.
2423

2524
For general documentation on the OpenXC platform, visit the main `OpenXC site`_.
2625

docs/installation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ Install Python and Pip
55
----------------------
66

77
This library (obviously) requires a Python language runtime - the OpenXC library
8-
currently works with Python 2.7, but not Python 3.x.
8+
supports python 3.x only, for python 2.x support use version 0.15.0.
99

1010
- **Mac OS X and Linux**
1111

1212
Mac OS X and most Linux distributions already have a compatible Python
1313
installed. Run ``python --version`` from a terminal to check - you need a
14-
2.7.x version, such as 2.7.8.
14+
3.6.x version, such as 3.6.8.
1515

1616
- **Windows**
1717

18-
#. Download and run the `Python 2.7.x MSI installer <https://www.python.org/downloads/release/python-2716/>`_.
18+
#. Download and run the `Python 3.6.x MSI installer <https://www.python.org/downloads/>`_.
1919
Make sure to select to option to ``Add python.exe to Path``.
2020
#. Add the Python Scripts directory your PATH:
21-
``PATH=%PATH%;c:\Python27\Scripts``. If you aren't sure how to edit your
21+
``PATH=%PATH%;C:\Users\%username%\AppData\Local\Programs\Python\Python36-32\Scripts``. If you aren't sure how to edit your
2222
``PATH``, see `this guide for all versions of Windows
2323
<https://www.java.com/en/download/help/path.xml>`_. Log out and back in for
2424
the change to take effect.

fabfile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import with_statement
1+
22

33
import os
44
from fabric.api import *
@@ -63,7 +63,7 @@ def version_to_tuple(version):
6363

6464
def make_tag():
6565
if confirm(yellow("Tag this release?"), default=True):
66-
print(green("The last 5 tags were: "))
66+
print((green("The last 5 tags were: ")))
6767
tags = local('git tag | tail -n 20', capture=True)
6868
pp(sorted(tags.split('\n'), compare_versions, reverse=True))
6969
prompt("New release tag in the format vX.Y[.Z]?", 'tag',
@@ -74,7 +74,7 @@ def make_tag():
7474
local('git fetch --tags origin', capture=True)
7575
else:
7676
env.tag = latest_git_tag()
77-
print(green("Using latest tag %(tag)s" % env))
77+
print((green("Using latest tag %(tag)s" % env)))
7878
return env.tag
7979

8080
@task

openxc/controllers/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import binascii
88

99
try:
10-
from Queue import Queue
11-
from Queue import Empty
10+
from queue import Queue
11+
from queue import Empty
1212
except ImportError:
1313
# Python 3
1414
from queue import Queue

openxc/controllers/serial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Controller implementation for a virtual serial device."""
2-
from __future__ import absolute_import
2+
33
import time
44

55
from .base import Controller

openxc/controllers/usb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Controller implementation for an OpenXC USB device."""
2-
from __future__ import absolute_import
2+
33

44
import logging
55
import usb.core

0 commit comments

Comments
 (0)