diff options
author | Omer Katz <omer.drow@gmail.com> | 2019-06-10 18:14:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 18:14:25 +0300 |
commit | f9fbd8eb48f21f9e308013209b33758aa5ed47e5 (patch) | |
tree | 538d900ce6819bebc8a4ecae009847ba9d3c6f84 | |
parent | 44f0a4a88f45ab4004a29b5ceeb50c699144a8f1 (diff) | |
download | kombu-f9fbd8eb48f21f9e308013209b33758aa5ed47e5.tar.gz |
Use fastuuid on CPython>=3.5 (#1056)
* Use fastuuid on CPython>=3.5.
* Only install fastuuid on Linux.
* For some reason we're stillgetting the thrusty build env.
Specify xenial explictly.
* Specify Python versions for lint stages.
* Ensure pycurl deps are installed.
* Run update before.
* Upgrade tox and dependencies.
* Happify docstyle.
-rw-r--r-- | .travis.yml | 18 | ||||
-rw-r--r-- | kombu/serialization.py | 1 | ||||
-rw-r--r-- | kombu/utils/uuid.py | 5 | ||||
-rw-r--r-- | requirements/default.txt | 1 |
4 files changed, 22 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 5060f384..5fa25996 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,16 +9,19 @@ env: stages: - test - lint - + matrix: include: - python: 2.7 env: TOXENV=2.7 + dist: xenial - python: 3.5 env: TOXENV=3.5 + dist: xenial - python: 3.6 env: TOXENV=3.6 + dist: xenial - python: 3.7 env: TOXENV=3.7-linux sudo: true @@ -34,16 +37,27 @@ matrix: before_install: sudo apt-get update && sudo apt-get install libgnutls-dev - env: TOXENV=flake8 stage: lint + dist: xenial + python: 3.7 - env: TOXENV=flakeplus stage: lint + dist: xenial + python: 2.7 - env: TOXENV=apicheck stage: lint + dist: xenial + python: 3.7 - env: TOXENV=pydocstyle stage: lint + dist: xenial + python: 3.7 +before_install: + - sudo apt update + - sudo apt install libcurl4-openssl-dev libssl-dev gnutls-dev install: - pip --disable-pip-version-check install -U pip setuptools wheel | cat - - pip --disable-pip-version-check install -U tox | cat + - pip --disable-pip-version-check install --upgrade-strategy eager -U tox | cat script: tox -v -- -v after_success: - .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml diff --git a/kombu/serialization.py b/kombu/serialization.py index de989b29..de41c338 100644 --- a/kombu/serialization.py +++ b/kombu/serialization.py @@ -415,6 +415,7 @@ NOTSET = object() def enable_insecure_serializers(choices=NOTSET): """Enable serializers that are considered to be unsafe. + Note: Will enable ``pickle``, ``yaml`` and ``msgpack`` by default, but you can also specify a list of serializers (by name or content type) diff --git a/kombu/utils/uuid.py b/kombu/utils/uuid.py index 341475bf..d9f19c76 100644 --- a/kombu/utils/uuid.py +++ b/kombu/utils/uuid.py @@ -1,7 +1,10 @@ """UUID utilities.""" from __future__ import absolute_import, unicode_literals -from uuid import uuid4 +try: + from fastuuid import uuid4 +except ImportError: + from uuid import uuid4 def uuid(_uuid=uuid4): diff --git a/requirements/default.txt b/requirements/default.txt index 0367df9c..02e328a0 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1 +1,2 @@ amqp>=2.5.0,<3.0 +fastuuid;platform_python_implementation=="CPython" and python_version>="3.5" and sys_platform=="linux" |