From 7ce6dc77fd21d5a77e538290cc314dce382843f6 Mon Sep 17 00:00:00 2001 From: Martin Uhrin Date: Tue, 10 Dec 2019 13:10:24 +0100 Subject: [PATCH] Updated yaml code to support 5.1 Had to pin prospector at <1.1.7 which has problems with pylint, see: https://github.com/PyCQA/pylint-plugin-utils/issues/12 Also took opportunity to up pika to 1.0 and above. --- .travis.yml | 6 +-- kiwipy/rmq/defaults.py | 2 +- setup.py | 111 ++++++++++++++++++++--------------------- 3 files changed, 57 insertions(+), 62 deletions(-) diff --git a/.travis.yml b/.travis.yml index 38787eb..e1f04be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ language: python cache: pip -before_install: - - sudo apt-get install rabbitmq-server - addons: apt: - update: true + packages: + - rabbitmq-server python: - 2.7 diff --git a/kiwipy/rmq/defaults.py b/kiwipy/rmq/defaults.py index ea12b20..66c0910 100644 --- a/kiwipy/rmq/defaults.py +++ b/kiwipy/rmq/defaults.py @@ -18,4 +18,4 @@ TASK_PREFETCH_COUNT = 0 ENCODER = partial(yaml.dump, encoding='utf-8') -DECODER = yaml.load +DECODER = partial(yaml.load, Loader=yaml.Loader) diff --git a/setup.py b/setup.py index 4d3169b..9dd03c2 100644 --- a/setup.py +++ b/setup.py @@ -10,60 +10,57 @@ with open('kiwipy/version.py') as f: exec(f.read(), about) -setup( - name="kiwipy", - version=about['__version__'], - description='A python remote communications library', - long_description=open('README.rst').read(), - url='https://github.com/muhrin/kiwipy.git', - author='Martin Uhrin', - author_email='martin.uhrin@gmail.com', - license=__license__, - classifiers=[ - 'Development Status :: 4 - Beta', - 'License :: OSI Approved :: MIT License', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - ], - keywords='communication messaging rpc broadcast', - install_requires=[ - 'six', - 'shortuuid', - 'typing; python_version<"3.5"', - 'enum34; python_version<"3.4"', - 'backports.tempfile; python_version<"3.2"', - 'futures; python_version == "2.7"', - ], - extras_require={ - 'rmq': [ - 'pika>=1.0.0b2', - 'topika>=0.2.0, <0.3.0', - 'tornado<6; python_version<"3"', - 'tornado<5; python_version>="3"', - 'pyyaml' - ], - 'dev': [ - 'pip', - 'pre-commit', - 'pytest>=4', - 'pytest-cov', - 'ipython<6', - 'twine', - 'yapf', - 'prospector', - 'pylint<2; python_version<"3"', - 'pylint; python_version>="3"', - ], - "docs": [ - "Sphinx==1.8.4", - "Pygments==2.3.1", - "docutils==0.14", - ], - }, - packages=['kiwipy', 'kiwipy.rmq'], - test_suite='test') +setup(name="kiwipy", + version=about['__version__'], + description='A python remote communications library', + long_description=open('README.rst').read(), + url='https://github.com/muhrin/kiwipy.git', + author='Martin Uhrin', + author_email='martin.uhrin@gmail.com', + license=__license__, + classifiers=[ + 'Development Status :: 4 - Beta', + 'License :: OSI Approved :: MIT License', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + keywords='communication messaging rpc broadcast', + install_requires=[ + 'six', + 'shortuuid', + 'typing; python_version<"3.5"', + 'enum34; python_version<"3.4"', + 'backports.tempfile; python_version<"3.2"', + 'futures; python_version == "2.7"', + ], + python_requires=">=2.7,!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + extras_require={ + 'rmq': [ + 'pika>=1.0.0', 'topika>=0.2.0, <0.3.0', 'tornado<6; python_version<"3"', 'tornado<5; python_version>="3"', + 'pyyaml' + ], + 'dev': [ + 'pip', + 'pre-commit', + 'pytest>=4', + 'pytest-cov', + 'ipython<6', + 'twine', + 'yapf', + 'prospector<1.1.7', + 'pylint<2; python_version<"3"', + 'pylint; python_version>="3"', + ], + "docs": [ + "Sphinx==1.8.4", + "Pygments==2.3.1", + "docutils==0.14", + ], + }, + packages=['kiwipy', 'kiwipy.rmq'], + test_suite='test')