Commit a1809a39 authored by Andreas Tille's avatar Andreas Tille
Browse files

Fix for numpy 1.14

parent 7fe42277
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
python-matplotlib-venn (0.11.5-5) UNRELEASED; urgency=medium

  * Testsuite: autopkgtest-pkg-python
  * Fix for numpy 1.14
    Closes: #902516

 -- Andreas Tille <tille@debian.org>  Wed, 25 Apr 2018 16:11:56 +0200

+24 −0
Original line number Diff line number Diff line
Description: Numpy 1.14 has changed its output format for str and repr,
 changing whitespace and the number of sig figs. This breaks doctests
 that include direct numpy output without formatting the values
 explicitly. 
Orgigin: https://wiki.debian.org/ContinuousIntegration/TriagingTips/numpy-1.14-doctests
Bug-Debian: https://bugs.debian.org/902516
Author: Andreas Tille <tille@debian.org>
Last-Update: Fri, 06 Jul 2018 02:51:00 +1000

--- a/matplotlib_venn/_venn2.py
+++ b/matplotlib_venn/_venn2.py
@@ -14,6 +14,12 @@ if 'py.test' in os.path.basename(sys.arg
     matplotlib.use('Agg')
 
 import numpy as np
+# Whitespace changes between numpy 1.13 and 1.14 will cause the doctests
+# to fail; when doctests are updated to 1.14 format, this can be removed.
+try:    # CRUFT
+    np.set_printoptions(legacy='1.13')
+except TypeError:
+    pass
 import warnings
 from collections import Counter
 
+1 −0
Original line number Diff line number Diff line
fix_build_time_test.patch
numpy_1.14.patch