diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..1b7b991 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +- repo: git@github.com:pre-commit/pre-commit-hooks + sha: v0.9.1 + hooks: + - id: check-case-conflict + - id: fix-encoding-pragma + - id: check-docstring-first diff --git a/.travis.yml b/.travis.yml index 12dd341..fff568d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: required +sudo: false language: python python: - "2.6" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 398ee46..42acb88 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,11 @@ Release history --------------- +0.4.4 (December 27th 2017) +++++++++++++++++++++++++++ +- fixed: fixed wheel dependency on python 2.6 and 3.3 +- fixed: pep8 related changes, doc fixes + 0.4.3 (June 26th 2017) ++++++++++++++++++++++ - fixed: nsupdate URLs diff --git a/Makefile b/Makefile index 59bcfde..e39a91d 100644 --- a/Makefile +++ b/Makefile @@ -41,11 +41,10 @@ deb: clean: - @echo "Cleaning up distutils stuff" - rm -rf build - rm -rf dist - rm -rf deb_dist - rm -rf *.egg - rm -rf *.egg-info + @echo "Cleaning up distutils and tox stuff" + rm -rf build dist deb_dist + rm -rf *.egg .eggs *.egg-info + rm -rf .tox @echo "Cleaning up byte compiled python stuff" - find . -type f -regex ".*\.py[co]$$" -delete + find . -regex "\(.*__pycache__.*\|*.py[co]\)" -delete + diff --git a/README.rst b/README.rst index dcdd15c..02d122f 100644 --- a/README.rst +++ b/README.rst @@ -4,15 +4,16 @@ Dyndnsc - dynamic dns update client .. image:: https://travis-ci.org/infothrill/python-dyndnsc.svg?branch=develop :target: https://travis-ci.org/infothrill/python-dyndnsc -.. image:: https://coveralls.io/repos/infothrill/python-dyndnsc/badge.png?branch=develop +.. image:: https://img.shields.io/coveralls/infothrill/python-dyndnsc/develop.svg :target: https://coveralls.io/r/infothrill/python-dyndnsc?branch=develop + :alt: Code coverage .. image:: https://img.shields.io/pypi/v/dyndnsc.svg :target: https://pypi.python.org/pypi/dyndnsc/ -.. image:: https://requires.io/github/infothrill/python-dyndnsc/requirements.png?branch=develop - :target: https://requires.io/github/infothrill/python-dyndnsc/requirements/?branch=develop - :alt: Requirements Status +.. image:: https://img.shields.io/requires/github/infothrill/python-dyndnsc.svg + :target: https://requires.io/github/infothrill/python-dyndnsc/requirements/?branch=develop + :alt: Requirements Status *Dyndnsc* is a command line client for sending updates to dynamic dns (ddns, dyndns) services. It supports multiple protocols and services, @@ -45,7 +46,7 @@ Installation Requirements ============ -* Python 2.6, 2.7 or 3.2+ +* Python 2.6, 2.7 or 3.3+ Status diff --git a/docs/requirements.txt b/docs/requirements.txt index 6f728c7..534c9b6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1 @@ -Sphinx==1.6.2 +Sphinx==1.6.3 diff --git a/docs/user/faq.rst b/docs/user/faq.rst index ea693ba..7422fb3 100644 --- a/docs/user/faq.rst +++ b/docs/user/faq.rst @@ -15,12 +15,13 @@ supported: * Python 2.6 * Python 2.7 -* Python 3.2 * Python 3.3 * Python 3.4 -* PyPy 1.9 +* Python 3.5 +* Python 3.6 +* PyPy -Support for Python 2.6 and 3.2 may be dropped at any time. +Support for Python 2.6 may be dropped at any time. Is service xyz supported? ------------------------- diff --git a/dyndnsc/__init__.py b/dyndnsc/__init__.py index 6581986..ecb0124 100644 --- a/dyndnsc/__init__.py +++ b/dyndnsc/__init__.py @@ -1,4 +1,5 @@ +# -*- coding: utf-8 -*- from . import updater from .core import getDynDnsClientForConfig, DynDnsClient -__version__ = '0.4.3' +__version__ = '0.4.4' diff --git a/dyndnsc/common/detect_ip.py b/dyndnsc/common/detect_ip.py index e1e3757..173b215 100644 --- a/dyndnsc/common/detect_ip.py +++ b/dyndnsc/common/detect_ip.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above diff --git a/dyndnsc/tests/plugins/notify/test_growl.py b/dyndnsc/tests/plugins/notify/test_growl.py index 8758e91..7b30818 100644 --- a/dyndnsc/tests/plugins/notify/test_growl.py +++ b/dyndnsc/tests/plugins/notify/test_growl.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import unittest diff --git a/dyndnsc/tests/plugins/notify/test_osxnotify.py b/dyndnsc/tests/plugins/notify/test_osxnotify.py index 5b3e722..292fcd5 100644 --- a/dyndnsc/tests/plugins/notify/test_osxnotify.py +++ b/dyndnsc/tests/plugins/notify/test_osxnotify.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import unittest diff --git a/dyndnsc/tests/test_daemon.py b/dyndnsc/tests/test_daemon.py index e3cd5c8..6925340 100644 --- a/dyndnsc/tests/test_daemon.py +++ b/dyndnsc/tests/test_daemon.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import unittest from dyndnsc import daemon diff --git a/setup.py b/setup.py index c70787b..287dc15 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,6 @@ 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', @@ -49,6 +48,15 @@ ) +def patch_setup_requires(requires): + """python version compatibility""" + if sys.version_info < (2, 7) or (3, 1) < sys.version_info < (3, 4): + # https://github.com/pypa/wheel/blob/7ca7b3552e55030b5d78cd90d53f1d99c9139f16/CHANGES.txt#L15 + return requires + ["wheel==0.29.0"] + else: + return requires + + def patch_test_requires(requires): """python version compatibility""" if sys.version_info < (3, 3): @@ -75,6 +83,7 @@ def patch_install_requires(requires): to_add.append("importlib") return requires + to_add + if sys.version_info < (2, 7, 4): # work around python issue http://bugs.python.org/issue15881 # affects only python2 when using multiprocessing and if nose is installed @@ -100,6 +109,7 @@ def patch_install_requires(requires): 'protocols', long_description=README + '\n\n' + CHANGELOG, url='https://github.com/infothrill/python-dyndnsc', + setup_requires=patch_setup_requires([]), install_requires=patch_install_requires( ['requests>=2.0.1', 'setuptools', 'netifaces>=0.10.5']), entry_points=(""" @@ -111,5 +121,5 @@ def patch_install_requires(requires): tests_require=patch_test_requires(['bottle==0.12.7', 'pep8>=1.3']), package_data={'dyndnsc/resources': ['dyndnsc/resources/*.ini']}, include_package_data=True, - zip_safe = False + zip_safe=False ) diff --git a/tox.ini b/tox.ini index 7165082..e675d65 100644 --- a/tox.ini +++ b/tox.ini @@ -1,16 +1,18 @@ # Tox (http://tox.testrun.org/) [tox] -minversion = 1.8 +minversion = 2.0 envlist = pypy, py26, py27, py32, py33, py34, py35, py36, docs skipsdist=True [testenv] +passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH deps = -rrequirements.txt -commands = {envpython} setup.py test + coveralls +commands = coverage run --source dyndnsc setup.py test + coveralls [testenv:docs] -#changedir=docs basepython=python3.6 whitelist_externals = cd deps = -rdocs/requirements.txt