Commit 9d2cc064 authored by Michael Howitz's avatar Michael Howitz Committed by GitHub

Add support for 3.8 and update documentation to Python 3. (#110)

+ Test pure versions and docs in TravisCI.
parent 1b2ffc39
language: python
dist: xenial
matrix:
include:
- os: linux
python: 2.7
- name: 2.7-pure
os: linux
python: 2.7
env: PURE_PYTHON=1
- os: linux
python: 3.5
- os: linux
......@@ -14,8 +19,22 @@ matrix:
- os: linux
python: pypy3
- os: linux
dist: xenial
python: 3.7
- name: 3.7-pure
os: linux
python: 3.7
env: PURE_PYTHON=1
- os: linux
python: 3.8-dev
- name: docs
os: linux
python: 3.6
install:
- pip install -U -e .[docs]
script:
- sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
- sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
after_success:
# It's important to use 'macpython' builds to get the least
# restrictive wheel tag. It's also important to avoid
# 'homebrew 3' because it floats instead of being a specific version.
......@@ -50,8 +69,8 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi
install:
- pip install -U pip setuptools cffi wheel coverage coveralls
install:
- pip install -U -e .[test]
script:
- python --version
......
......@@ -4,7 +4,9 @@
4.5.1 (unreleased)
------------------
- Nothing changed yet.
- Add support for Python 3.8a3.
- Update documentation to Python 3.
4.5.0 (2019-05-09)
......
......@@ -46,10 +46,10 @@ The examples below use a stub data manager class, and its stub cache class:
... self._mru = []
... def mru(self, oid):
... self._mru.append(oid)
>>> from zope.interface import implements
>>> from zope.interface import implementer
>>> from persistent.interfaces import IPersistentDataManager
>>> class DM(object):
... implements(IPersistentDataManager)
>>> @implementer(IPersistentDataManager)
... class DM(object):
... def __init__(self):
... self._cache = Cache()
... self.registered = 0
......@@ -117,7 +117,7 @@ it has not yet been assigned, its value is ``None``:
.. doctest::
>>> print p._p_jar
>>> print(p._p_jar)
None
The :attr:`_p_oid` attribute is the :term:`object id`, a unique value
......@@ -126,7 +126,7 @@ has not yet been associated with its :term:`jar`, its value is ``None``:
.. doctest::
>>> print p._p_oid
>>> print(p._p_oid)
None
Without a data manager, modifying a persistent object has no effect on
......@@ -376,10 +376,10 @@ The ``_p_serial`` attribute is not affected by calling setstate.
.. doctest::
>>> p._p_serial = "00000012"
>>> p._p_serial = b"00000012"
>>> p.__setstate__(p.__getstate__())
>>> p._p_serial
'00000012'
b'00000012'
Estimated Object Size
......
......@@ -95,6 +95,7 @@ setup(name='persistent',
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: ZODB",
......
[tox]
envlist =
py27,py35,py36,py37,py27-pure,py27-pure-cffi,pypy,pypy3,coverage,docs
py27,py35,py36,py37,py37-pure,py38,py27-pure,py27-pure-cffi,pypy, pypy3,coverage,docs
[testenv]
deps =
......@@ -20,20 +20,26 @@ basepython =
setenv =
PURE_PYTHON = 1
[testenv:py37-pure]
basepython =
python3.7
setenv =
PURE_PYTHON = 1
[testenv:coverage]
usedevelop = true
basepython =
python3.6
commands =
coverage run -m zope.testrunner --test-path=.
coverage report --fail-under=93
coverage report --fail-under=100
deps =
{[testenv]deps}
coverage
[testenv:docs]
basepython =
python2.7
python3.6
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment