Skip to content

Commit f1bcd1a

Browse files
committed
Python 3 support (thanks @Lupino, closes #15)
* Changed riemann_client.riemann_pb2 to wrap py2 and py3 modules * Changed setup.py to dynamically select a protobuf dependency * Docs use version and author from module * Tests updated to work on Python 3 * Tests run on py33 and py34 * Tests run coverage and flake8 under py26 and py34
1 parent c5bb324 commit f1bcd1a

9 files changed

Lines changed: 409 additions & 358 deletions

File tree

README.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,26 @@ The ``QueuedClient`` class modifies the ``event()`` method to add events to a qu
5858
Installation
5959
------------
6060

61-
``riemann-client`` requires Python 2.6 or 2.7, and can be installed with ``pip install riemann-client``. Python 3 is not supported due to the dependency on the Google `protobuf <https://pypi.python.org/pypi/protobuf>`_ package. You can also use the provided makefile to build and distribute an RPM using `fpm <https://github.com/jordansissel/fpm>`_.
61+
``riemann-client`` requires Python 2.6 or above, and can be installed with ``pip install riemann-client``. It will use Google's `protobuf <https://pypi.python.org/pypi/protobuf>`_ library when running under Python 2, and `GreatFruitOmsk <https://github.com/GreatFruitOmsk>`_'s `protobuf-py3 <https://pypi.python.org/pypi/protobuf-py3>`_ when running under Python 3. Python 3 support is experimental and is likley to use Google's `protobuf` once it supports Python 3 fully.
6262

6363
Requirements
6464
^^^^^^^^^^^^
6565

6666
* `click <http://click.pocoo.org/>`_
67-
* `protobuf <https://pypi.python.org/pypi/protobuf>`_
67+
* `protobuf <https://pypi.python.org/pypi/protobuf>`_ (when using Python 2)
68+
* `protobuf <https://pypi.python.org/pypi/protobuf-py3>`_ (when using Python 3)
6869

6970
Changelog
7071
---------
7172

72-
Version 5.x.x
73+
Version 5.1.0
74+
^^^^^^^^^^^^^
75+
76+
* Added Python 3 support
77+
* Changed ``riemann_client.riemann_pb2`` to wrap ``_py2`` and ``_py3`` modules
78+
* Changed ``setup.py`` to dynamically select a ``protobuf`` dependency
79+
80+
Version 5.0.x
7381
^^^^^^^^^^^^^
7482

7583
* Added API documentation (`riemann-client.readthedocs.org <http://riemann-client.readthedocs.org/en/latest/>`_)

docs/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import os
44

5+
import riemann_client
6+
57
if not os.environ.get('READTHEDOCS', None):
68
import sphinx_rtd_theme
79
html_theme = 'sphinx_rtd_theme'
@@ -12,9 +14,8 @@
1214

1315
# General information about the project.
1416
project = u'riemann-client'
15-
copyright = u'2014, Sam Clements'
16-
version = '5.0'
17-
release = '5.0.0-dev'
17+
copyright = u'2014, ' + riemann_client.__author__
18+
version = release = riemann_client.__version__
1819

1920
# Add any Sphinx extension module names here, as strings. They can be
2021
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

riemann_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""A Python Riemann client and command line tool"""
22

3-
__version__ = '5.0.1'
3+
__version__ = '5.1.0'
44
__author__ = 'Sam Clements <sam.clements@datasift.com>'

0 commit comments

Comments
 (0)