Skip to content

Commit 4c613d0

Browse files
authored
Merge pull request #140 from thequackdaddy/py37
TST: Add python 3.7 testing
2 parents 80321a0 + 1869503 commit 4c613d0

File tree

3 files changed

+42
-24
lines changed

3 files changed

+42
-24
lines changed

.travis.yml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,49 @@
1-
language: python
2-
python:
3-
- 2.7
4-
- 3.4
5-
- 3.5
6-
- 3.6
1+
language: minimal
72
matrix:
83
include:
4+
- env:
5+
- PYTHON_VERSION=2.7
6+
- env:
7+
- PYTHON_VERSION=3.4
8+
- env:
9+
- PYTHON_VERSION=3.5
10+
- env:
11+
- PYTHON_VERSION=3.6
12+
- env:
13+
- PYTHON_VERSION=3.7
914
# 0.14.0 is the last version with the old categorical system
1015
# libfortran=1.0 is needed to work around a bug in anaconda
1116
# (https://github.com/pydata/patsy/pull/83#issuecomment-206895923)
12-
- python: 3.4
13-
env: PANDAS_VERSION_STR="=0.14.0 libgfortran=1.0"
14-
- python: 2.7
15-
env: PANDAS_VERSION_STR="=0.14.0 libgfortran=1.0"
17+
- env:
18+
- PYTHON_VERSION=3.4
19+
- PANDAS_VERSION_STR="=0.14.0 libgfortran=1.0"
20+
- env:
21+
- PYTHON_VERSION=2.7
22+
- PANDAS_VERSION_STR="=0.14.0 libgfortran=1.0"
1623
# 0.18.0 has is_categorical_dtype in a different place than 0.19.0+
17-
- python: 3.4
18-
env: PANDAS_VERSION_STR="=0.18.0"
19-
- python: 2.7
20-
env: PANDAS_VERSION_STR="=0.18.0"
24+
- env:
25+
- PYTHON_VERSION=3.4
26+
- PANDAS_VERSION_STR="=0.18.0"
27+
- env:
28+
- PYTHON_VERSION=2.7
29+
- PANDAS_VERSION_STR="=0.18.0"
2130
# make sure it works without pandas
22-
- python: 3.6
23-
env: PANDAS_VERSION_STR="NONE"
24-
- python: 2.7
25-
env: PANDAS_VERSION_STR="NONE"
31+
- env:
32+
- PYTHON_VERSION=2.7
33+
- PANDAS_VERSION_STR="NONE"
34+
- env:
35+
- PYTHON_VERSION=3.6
36+
- PANDAS_VERSION_STR="NONE"
37+
- env:
38+
- PYTHON_VERSION=3.7
39+
- PANDAS_VERSION_STR="NONE"
2640

2741
# This disables sudo, but makes builds start much faster
2842
# See http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
2943
sudo: false
3044
before_install:
3145
# Work around terrible pathological behaviour in OpenBLAS multithreading, that causes execution time to blow up from 3 minutes to 18 minutes, apparently in SVD on smallish matrices
3246
- export OMP_NUM_THREADS=1
33-
# Escape Travis virtualenv
34-
- deactivate
3547
# See: http://conda.pydata.org/docs/travis.html
3648
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
3749
- bash miniconda.sh -b -p $HOME/miniconda
@@ -42,7 +54,7 @@ before_install:
4254
- conda info -a
4355
- export PKGS="numpy scipy coverage nose pip"
4456
- if [ "$PANDAS_VERSION_STR" != "NONE" ]; then export PKGS="${PKGS} pandas${PANDAS_VERSION_STR}"; fi
45-
- conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION ${PKGS}
57+
- conda create -q -n testenv python=$PYTHON_VERSION ${PKGS}
4658
- source activate testenv
4759
install:
4860
- python setup.py sdist

patsy/constraint.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
__all__ = ["LinearConstraint"]
1111

1212
import re
13-
from collections import Mapping
13+
try:
14+
from collections.abc import Mapping
15+
except ImportError:
16+
from collections import Mapping
1417
import six
1518
import numpy as np
1619
from patsy import PatsyError

tools/check-API-refs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
root = dirname(dirname(abspath(__file__)))
1010
patsy_ref = root + "/doc/API-reference.rst"
1111

12-
doc_re = re.compile("^\.\. (.*):: ([^\(]*)")
12+
doc_re = re.compile(r"^\.\. (.*):: ([^\(]*)")
13+
14+
1315
def _documented(rst_path):
1416
documented = set()
1517
for line in open(rst_path):
@@ -21,14 +23,15 @@ def _documented(rst_path):
2123
documented.add(symbol)
2224
return documented
2325

26+
2427
try:
2528
import patsy
2629
except ImportError:
2730
sys.path.append(root)
2831
import patsy
2932

3033
documented = set(_documented(patsy_ref))
31-
#print(documented)
34+
# print(documented)
3235
exported = set(patsy.__all__)
3336
missed = exported.difference(documented)
3437
extra = documented.difference(exported)

0 commit comments

Comments
 (0)