Commit 6532ad0f authored by Kurt Griffiths's avatar Kurt Griffiths Committed by GitHub

chore: Migrate from msgpack-python to msgpack (#1200)

Partially implements issue #1199.
parent 6ee05dad
......@@ -29,18 +29,10 @@ matrix:
env: TOXENV=py27_smoke_cython
- python: 3.3
env: TOXENV=py33
- python: 3.3
env: TOXENV=py33_cython
- python: 3.4
env: TOXENV=py34
- python: 3.4
env: TOXENV=py34_cython
- python: 3.5
env: TOXENV=py35
- python: 3.5
env: TOXENV=py35_ujson
- python: 3.5
env: TOXENV=py35_cython
- python: 3.6
env: TOXENV=py36
- python: 3.6
......
......@@ -5,14 +5,22 @@ from falcon.media import BaseHandler
class MessagePackHandler(BaseHandler):
"""Handler built using the :py:mod:`msgpack` module from python-msgpack
"""Handler built using the :py:mod:`msgpack` module.
Note:
This handler uses the `bin` type option which expects bytes instead
of strings.
Note:
This handler requires the ``python-msgpack`` package to be installed.
This handler requires the extra ``msgpack`` package, which must be
installed in addition to ``falcon`` from PyPI:
.. code::
$ pip install msgpack
Python 2.6 users will need to use the deprecated ``msgpack-python``
package instead, pinned to version 0.4.8.
"""
def __init__(self):
......
coverage>=4.1
pytest==3.2.5 # Last version to support py26 and py33
pyyaml==3.11 # Last version to support py26
requests
six
testtools
# Handler Specific
msgpack-python
# Validator Specific
jsonschema
# -----------------------------------------------------------------------------
# Pin to last versions to support Python 2.6/3.3
# -----------------------------------------------------------------------------
pytest==3.2.5
pyyaml==3.11
# Handler Specific
msgpack-python==0.4.8
# -----------------------------------------------------------------------------
# Latest versions compatible with Python 2.6/3.3
# -----------------------------------------------------------------------------
coverage>=4.1
requests
six
testtools
# Validator Specific
jsonschema
# -----------------------------------------------------------------------------
# Latest versions compatible with Python 2.6/3.3
# -----------------------------------------------------------------------------
coverage>=4.1
pytest
pyyaml
requests
six
testtools
# Validator Specific
jsonschema
# Handler Specific
msgpack
......@@ -31,10 +31,13 @@ envlist = py26,
docs
[testenv]
deps = -r{toxinidir}/requirements/tests
deps = -r{toxinidir}/requirements/tests-py27-py34
commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon
pytest tests []
[py26-py33-deps]
deps = -r{toxinidir}/requirements/tests-py26-py33
# --------------------------------------------------------------------
# Coverage
# --------------------------------------------------------------------
......@@ -46,7 +49,7 @@ commands = {toxinidir}/tools/clean.sh {toxinidir}/falcon
coverage run -m pytest tests []
[testenv:py26]
# NOTE(kgriffs): pytest-randomly is not compatible with py26
deps = {[py26-py33-deps]deps}
whitelist_externals = {[with-coverage]whitelist_externals}
commands = {[with-coverage]commands}
......@@ -63,12 +66,29 @@ deps = {[testenv]deps}
whitelist_externals = {[with-coverage]whitelist_externals}
commands = {[with-coverage]commands}
# --------------------------------------------------------------------
# Additional test suite environments
# --------------------------------------------------------------------
[testenv:py33]
basepython = python3.3
deps = {[py26-py33-deps]deps}
[testenv:py34]
basepython = python3.4
[testenv:pypy]
basepython = pypy
[testenv:pypy3]
basepython = pypy3
# --------------------------------------------------------------------
# Debugging
# --------------------------------------------------------------------
[with-debug-tools]
deps = -r{toxinidir}/requirements/tests
deps = -r{toxinidir}/requirements/tests-py27-py34
pdbpp
[testenv:py2_debug]
......@@ -85,7 +105,7 @@ deps = {[with-debug-tools]deps}
# --------------------------------------------------------------------
[with-ujson]
deps = -r{toxinidir}/requirements/tests
deps = -r{toxinidir}/requirements/tests-py27-py34
ujson
[testenv:py27_ujson]
......@@ -105,7 +125,7 @@ deps = {[with-ujson]deps}
# --------------------------------------------------------------------
[with-cython]
deps = -r{toxinidir}/requirements/tests
deps = -r{toxinidir}/requirements/tests-py27-py34
cython
[testenv:py27_cython]
......@@ -114,7 +134,7 @@ deps = {[with-cython]deps}
[testenv:py33_cython]
basepython = python3.3
deps = {[with-cython]deps}
deps = {[py26-py33-deps]deps}
[testenv:py34_cython]
basepython = python3.4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment