Skip to content

Commit 955aec3

Browse files
authored
Support Python 3.8 (#208)
* Include Python 3.8 testing in tox * Test Linux Python 3.8 on Travis CI * Add Python 3.8 to `setup.py` classifiers * Update contributing guide to include Python 3.8 * Add Python 3.8 testing to PR template
1 parent a8c1c2f commit 955aec3

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
TODO:
44
* [ ] Unit tests and/or doctests in docstrings
5-
* [ ] ``tox -e py37`` passes locally
5+
* [ ] ``tox -e py38`` passes locally
66
* [ ] ``tox -e py27`` passes locally
77
* [ ] Docstrings and API docs for any new/modified user-facing classes and functions
88
* [ ] Changes documented in docs/release.rst

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ matrix:
2525
language: python
2626
python: 3.7
2727
dist: xenial
28+
- os: linux
29+
language: python
30+
python: 3.8
31+
dist: xenial
2832
sudo: true
2933
- os: osx
3034
language: generic

docs/contributing.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ you have cloned the NumCodecs source code and your current working directory is
9090
the repository, you can do something like the following::
9191

9292
$ mkdir -p ~/pyenv/numcodecs-dev
93-
$ virtualenv --no-site-packages --python=/usr/bin/python3.7 ~/pyenv/numcodecs-dev
93+
$ virtualenv --no-site-packages --python=/usr/bin/python3.8 ~/pyenv/numcodecs-dev
9494
$ source ~/pyenv/numcodecs-dev/bin/activate
9595
$ pip install -r requirements_dev.txt
9696
$ python setup.py build_ext --inplace
@@ -145,11 +145,11 @@ To also run the doctests within docstrings, run::
145145
Tests can be run under different Python versions using tox. E.g. (assuming you have the
146146
corresponding Python interpreters installed on your system)::
147147

148-
$ tox -e py27,py35,py36,py37
148+
$ tox -e py27,py35,py36,py37,py38
149149

150-
NumCodecs currently supports Python 2.7 and Python 3.5-3.7, so the above command must
151-
succeed before code can be accepted into the main code base. Note that only the py37
152-
tox environment runs the doctests, i.e., doctests only need to succeed under Python 3.7.
150+
NumCodecs currently supports Python 2.7 and Python 3.5-3.8, so the above command must
151+
succeed before code can be accepted into the main code base. Note that only the py38
152+
tox environment runs the doctests, i.e., doctests only need to succeed under Python 3.8.
153153

154154
All tests are automatically run via Travis (Linux) and AppVeyor (Windows) continuous
155155
integration services for every pull request. Tests must pass under both services before
@@ -164,14 +164,14 @@ Conformance can be checked by running::
164164

165165
$ flake8 --max-line-length=100 numcodecs
166166

167-
This is automatically run when invoking ``tox -e py37``.
167+
This is automatically run when invoking ``tox -e py38``.
168168

169169
Test coverage
170170
~~~~~~~~~~~~~
171171

172172
NumCodecs maintains 100% test coverage under the latest Python stable release (currently
173-
Python 3.7). Both unit tests and docstring doctests are included when computing
174-
coverage. Running ``tox -e py37`` will automatically run the test suite with coverage
173+
Python 3.8). Both unit tests and docstring doctests are included when computing
174+
coverage. Running ``tox -e py38`` will automatically run the test suite with coverage
175175
and produce a coverage report. This should be 100% before code can be accepted into the
176176
main code base.
177177

@@ -185,7 +185,7 @@ Documentation
185185
Docstrings for user-facing classes and functions should follow the `numpydoc
186186
<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_ standard,
187187
including sections for Parameters and Examples. All examples will be run as doctests
188-
under Python 3.7.
188+
under Python 3.8.
189189

190190
NumCodecs uses Sphinx for documentation, hosted on readthedocs.org. Documentation is
191191
written in the RestructuredText markup language (.rst files) in the ``docs`` folder.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ def run_setup(with_extensions):
345345
'Programming Language :: Python :: 3.5',
346346
'Programming Language :: Python :: 3.6',
347347
'Programming Language :: Python :: 3.7',
348+
'Programming Language :: Python :: 3.8',
348349
],
349350
author='Alistair Miles',
350351
author_email='[email protected]',

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py27, py35, py36, py37, docs
7+
envlist = py27, py35, py36, py37, py38, docs
88

99
[testenv]
1010
setenv =
1111
PYTHONHASHSEED = 42
1212
# hooks for coverage exclusions based on Python major version
13-
py35,py36,py37: PY_MAJOR_VERSION = py3
13+
py35,py36,py37,py38: PY_MAJOR_VERSION = py3
1414
py27: PY_MAJOR_VERSION = py2
1515
commands =
1616
python setup.py build_ext --inplace
17-
py27,py35,py36: pytest -v --cov=numcodecs numcodecs
18-
py37: pytest -v --cov=numcodecs --doctest-modules --doctest-glob=*.pyx numcodecs
17+
py27,py35,py36,py37: pytest -v --cov=numcodecs numcodecs
18+
py38: pytest -v --cov=numcodecs --doctest-modules --doctest-glob=*.pyx numcodecs
1919
coverage report -m
20-
py37: flake8 numcodecs
20+
py38: flake8 numcodecs
2121
pip freeze
2222
deps =
2323
py27: backports.lzma

0 commit comments

Comments
 (0)