diff --git a/.gitignore b/.gitignore index 6021257..c90de32 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build/ dist/ .cache/ *.egg-info +poetry.lock diff --git a/.travis.yml b/.travis.yml index fbea35b..ff33629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,10 +12,11 @@ matrix: env: PYTHONASYNCIODEBUG=x dist: xenial sudo: true +before_install: + - pip install poetry install: - - pip install -r requirements.txt - - pip install coveralls -script: make check + - poetry install +script: poetry run make check after_success: coveralls notifications: email: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a0e8e3..08c1e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,3 +103,12 @@ - Change default log level from ERROR to INFO - Log retries on exception as INFO + +## [v1.7.0] - 2018-11-23 +### Changed + +- Support Python 3.7 +- Drop support for async in Python 3.4 +- Drop support for Python 2.6 +- Update development dependencies +- Use poetry for dependencies and packaging diff --git a/backoff/__init__.py b/backoff/__init__.py index 9173bf0..c9348fe 100644 --- a/backoff/__init__.py +++ b/backoff/__init__.py @@ -26,4 +26,4 @@ 'random_jitter' ] -__version__ = '1.6.0' +__version__ = '1.7.0' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..92ae0d9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,44 @@ +[tool.poetry] +name = "backoff" +version = "1.7.0" +description = "Function decoration for backoff and retry" +authors = ["Bob Green "] +readme = "README.rst" +repository = "https://github.com/litl/backoff" +license = "MIT" +keywords = "python retry backoff asyncio asychnronous synchronous exceptions retrying decorators exponential" +classifiers = ['Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Programming Language :: Python', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Software Development :: Libraries :: Python Modules', + 'Topic :: Utilities'] +packages = [ + { include = "backoff" }, + { include = "README.rst" }, + { include = "LICENSE" }, +] + +[tool.poetry.dependencies] +python = "^2.7 || ^3.4" + +[tool.poetry.dev-dependencies] +flake8 = "^3.6" +pytest = "^4.0" +pytest-cov = "^2.6" +pytest-asyncio = {version = "^0.9.0",python = "^3.5"} + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api" diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7423223..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -flake8==3.6.0 -pytest==3.10.1 -pytest-cov==2.6.0 -pytest-asyncio==0.9.0; python_version >= '3.5' diff --git a/setup.py b/setup.py deleted file mode 100644 index 0814583..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding:utf-8 - -import backoff - -from distutils import core - - -classifiers = ['Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Programming Language :: Python', - 'License :: OSI Approved :: MIT License', - 'Natural Language :: English', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: Implementation', - 'Programming Language :: Python :: Implementation :: CPython', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Utilities'] - -version = backoff.__version__ -url = "https://github.com/litl/backoff" -tarball_url = "{}/tarball/v{}".format(url, version) - - -def readme(): - with open("README.rst", "r") as infile: - return infile.read() - - -core.setup(name='backoff', - version=version, - description="Function decoration for backoff and retry", - long_description=readme(), - packages=['backoff'], - author="Bob Green", - author_email="rgreen@goscoutgo.com", - keywords="backoff function decorator", - url=url, - download_url=tarball_url, - license="MIT", - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', - classifiers=classifiers)