diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..1f5ebecb --- /dev/null +++ b/.coveragerc @@ -0,0 +1,6 @@ +[run] +branch = True +source = plone.recipe.zope2instance + +[report] +precision = 2 diff --git a/.gitignore b/.gitignore index 62fde7b8..4dbabab3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,8 @@ include/ lib/ parts pip-selfcheck.json +/.coverage /.installed.cfg +/.tox +/coverage.xml +/htmlcov diff --git a/.travis.yml b/.travis.yml index 1f3db4b7..709967c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python python: - 2.7 - 3.5 + - 3.6 install: - pip install setuptools==33.1.1 zc.buildout==2.5.3 - buildout bootstrap diff --git a/CHANGES.rst b/CHANGES.rst index 0285ec9d..1b3745e9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,8 +8,6 @@ Breaking changes: - Require at least ZODB 5 and Zope 4.0b1. - -- Python 3 compatibility. - Drop support for Plone 4.3 and 5.0. New features: @@ -17,6 +15,8 @@ New features: - Add wsgi support [tschorr] +- Add support for Python 3.5 and 3.6. + Bug fixes: - Python 3 compatibility with sixer diff --git a/setup.py b/setup.py index 3dace93b..689d7bf6 100644 --- a/setup.py +++ b/setup.py @@ -22,12 +22,13 @@ "Framework :: Buildout", "Framework :: Plone", "Framework :: Plone :: 5.1", - "Framework :: Zope2", + "Framework :: Zope :: 4", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", ], packages=find_packages('src'), diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..74aa8332 --- /dev/null +++ b/tox.ini @@ -0,0 +1,39 @@ +[tox] +envlist = + flake8, + py27, + py35, + py36, + coverage, + +skip_missing_interpreters = False + +[testenv] +commands = + {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap + {envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} -n install test + coverage run {envbindir}/test --all {posargs:-vc} +skip_install = true +deps = + setuptools==33.1.1 + zc.buildout + coverage +setenv = + COVERAGE_FILE=.coverage.{envname} + +[testenv:coverage] +basepython = python2.7 +deps = coverage +setenv = + COVERAGE_FILE=.coverage +commands = + coverage erase + coverage combine + coverage html + coverage xml + coverage report + +[testenv:flake8] +basepython = python2.7 +deps = flake8 +commands = flake8 --doctests src setup.py