Skip to content

Commit 6328c76

Browse files
committed
MAINT: A few python 3.7 fixes
1 parent 01604e1 commit 6328c76

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ matrix:
3333

3434
# This disables sudo, but makes builds start much faster
3535
# See http://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/
36+
sudo: false
3637
before_install:
3738
# 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
3839
- export OMP_NUM_THREADS=1

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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("^\\.\\. (.*):: ([^\\(]*)")
1313
def _documented(rst_path):
1414
documented = set()
1515
for line in open(rst_path):

0 commit comments

Comments
 (0)