Skip to content

Commit

Permalink
Add Python 3.6 support.
Browse files Browse the repository at this point in the history
Also add note on supported versions to the docs and readme.
Fixes #168.

Update tox.ini to correctly run testdocumentation and DRY with test deps.
  • Loading branch information
jamadden committed Jul 24, 2017
1 parent a89485c commit 7fb15fe
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Expand Up @@ -3,9 +3,9 @@ sudo: false
matrix:
include:
- os: linux
python: pypy-5.4.1
python: pypy-5.6.0
- os: linux
python: pypy3
python: pypy3.3-5.5-alpha
env: BUILOUT_OPTIONS=sphinx:eggs=
- os: linux
python: 2.7
Expand All @@ -15,14 +15,16 @@ matrix:
python: 3.4
- os: linux
python: 3.5
- os: linux
python: 3.6
install:
- pip install -U pip
- pip install zc.buildout
- buildout $BUILOUT_OPTIONS versions:sphinx=1.4.9
script:
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage run bin/coverage-test -v1j99; fi
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' || $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then bin/test -v1j99; fi
- if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then pushd doc; make html; popd; fi
- if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then bin/test -v1j99; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy3* ]]; then pushd doc; make html; popd; fi
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi # install early enough to get into the cache
after_success:
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then bin/coverage combine; fi
Expand Down
3 changes: 2 additions & 1 deletion README.rst
Expand Up @@ -3,7 +3,8 @@ ZODB, a Python object-oriented database
=======================================

ZODB provides an object-oriented database for Python that provides a
high-degree of transparency.
high-degree of transparency. ZODB runs on Python 2.7 or Python 3.3 and
above. It also runs on PyPy.

- no separate language for database operations

Expand Down
4 changes: 3 additions & 1 deletion doc/index.rst
Expand Up @@ -16,6 +16,8 @@ Because ZODB is an object database:

Check out the :doc:`tutorial`!

ZODB runs on Python 2.7 or Python 3.3 and above. It also runs on PyPy.

Transactions
============

Expand Down Expand Up @@ -201,7 +203,7 @@ Learning more
reference/index
articles/index

* `The ZODB Book (in progress) <http://zodb.readthedocs.org/en/latest/>`_
* `The ZODB Book (in progress) <http://zodb.readthedocs.org/en/latest/>`_

Downloads
=========
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Expand Up @@ -26,6 +26,7 @@
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
Expand Down Expand Up @@ -97,7 +98,11 @@ def read(path):

long_description = read("README.rst") + "\n\n" + read("CHANGES.rst")

tests_require = ['zope.testing', 'manuel']
tests_require = [
'manuel',
'zope.testing',
'zope.testrunner >= 4.4.6',
]

setup(name="ZODB",
version=version,
Expand Down
3 changes: 1 addition & 2 deletions src/ZODB/tests/testdocumentation.py
Expand Up @@ -33,7 +33,7 @@ def tearDown(test):

def test_suite():
base, src = os.path.split(os.path.dirname(os.path.dirname(ZODB.__file__)))
assert src == 'src'
assert src == 'src', src
base = join(base, 'doc')
guide = join(base, 'guide')
reference = join(base, 'reference')
Expand All @@ -54,4 +54,3 @@ def test_suite():

if __name__ == '__main__':
unittest.main(defaultTest='test_suite')

20 changes: 13 additions & 7 deletions tox.ini
Expand Up @@ -2,19 +2,25 @@
# Jython 2.7rc2 does work, but unfortunately has an issue running
# with Tox 1.9.2 (http://bugs.jython.org/issue2325)
#envlist = py26,py27,py33,py34,pypy,simple,jython,pypy3
envlist = py27,py33,py34,py35,pypy,simple,pypy3
envlist = py27,py33,py34,py35,py36,pypy,simple,pypy3

[testenv]
# ZODB.tests.testdocumentation needs to find
# itself in the source tree to locate the doc/
# directory. 'usedevelop' is more like what
# buildout.cfg does, and is simpler than having
# testdocumentation.py also understand how to climb
# out of the tox site-packages.
usedevelop = true
commands =
# Run unit tests first.
zope-testrunner -u --test-path=src --auto-color --auto-progress
zope-testrunner -u --test-path=src []
# Only run functional tests if unit tests pass.
zope-testrunner -f --test-path=src --auto-color --auto-progress
zope-testrunner -f --test-path=src []
# without explicit deps, setup.py test will download a bunch of eggs into $PWD
deps =
manuel
zope.testing
zope.testrunner >= 4.4.6
.[test]


[testenv:simple]
# Test that 'setup.py test' works
Expand All @@ -28,7 +34,7 @@ deps = {[testenv]deps}
basepython = python2.7
usedevelop = true
commands =
coverage run --source=ZODB -m zope.testrunner --test-path=src --auto-color --auto-progress
coverage run --source=ZODB -m zope.testrunner []
coverage report
deps =
coverage
Expand Down

0 comments on commit 7fb15fe

Please sign in to comment.