Control: tags 896003 + patch
Control: tags 896003 + pending
Control: tags 896285 + patch
Control: tags 896285 + pending
Control: tags 896401 + patch
Control: tags 896401 + pending

Dear maintainer,

I've prepared an NMU for seaborn (versioned as 0.8.0-1.1) and uploaded 
it to DELAYED/15. Please feel free to tell me if I should cancel it.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

diff -Nru seaborn-0.8.0/debian/changelog seaborn-0.8.0/debian/changelog
--- seaborn-0.8.0/debian/changelog	2017-07-24 13:10:14.000000000 +0300
+++ seaborn-0.8.0/debian/changelog	2018-09-23 09:31:01.000000000 +0300
@@ -1,3 +1,14 @@
+seaborn (0.8.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream FTBFS fixes. (Closes: #896003)
+  * python-seaborn: Add the missing dependency on python-tk.
+    (Closes: #896285)
+  * python3-seaborn: Add the missing dependency on python3-tk.
+    (Closes: #896401)
+
+ -- Adrian Bunk <[email protected]>  Sun, 23 Sep 2018 09:31:01 +0300
+
 seaborn (0.8.0-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru seaborn-0.8.0/debian/control seaborn-0.8.0/debian/control
--- seaborn-0.8.0/debian/control	2017-07-24 13:10:14.000000000 +0300
+++ seaborn-0.8.0/debian/control	2018-09-23 09:31:01.000000000 +0300
@@ -43,7 +43,8 @@
          python-numpy,
          python-scipy,
          python-pandas,
-         python-matplotlib
+         python-matplotlib,
+         python-tk
 Recommends: python-statsmodels,
             python-patsy,
             python-bs4
@@ -78,7 +79,8 @@
          python3-numpy,
          python3-scipy,
          python3-pandas,
-         python3-matplotlib
+         python3-matplotlib,
+         python3-tk
 Recommends: python3-patsy,
             python3-bs4
 Description: statistical visualization library for Python3
diff -Nru seaborn-0.8.0/debian/patches/0001-Add-warning-in-FacetGrid-when-drawing-categorical-pl.patch seaborn-0.8.0/debian/patches/0001-Add-warning-in-FacetGrid-when-drawing-categorical-pl.patch
--- seaborn-0.8.0/debian/patches/0001-Add-warning-in-FacetGrid-when-drawing-categorical-pl.patch	1970-01-01 02:00:00.000000000 +0200
+++ seaborn-0.8.0/debian/patches/0001-Add-warning-in-FacetGrid-when-drawing-categorical-pl.patch	2018-09-23 09:17:30.000000000 +0300
@@ -0,0 +1,83 @@
+From 556e116ab0223699a774a2c5d9d8c27c50be635c Mon Sep 17 00:00:00 2001
+From: mwaskom <[email protected]>
+Date: Sun, 27 Aug 2017 16:30:24 -0400
+Subject: Add warning in FacetGrid when drawing categorical plot without
+ {hue}_order
+
+---
+ seaborn/axisgrid.py            | 13 +++++++++++++
+ seaborn/categorical.py         |  5 ++++-
+ seaborn/tests/test_axisgrid.py | 10 +++++++++-
+ 4 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/seaborn/axisgrid.py b/seaborn/axisgrid.py
+index 3354912..0427c04 100644
+--- a/seaborn/axisgrid.py
++++ b/seaborn/axisgrid.py
+@@ -695,6 +695,19 @@ class FacetGrid(Grid):
+         # If color was a keyword argument, grab it here
+         kw_color = kwargs.pop("color", None)
+ 
++        # Check for categorical plots without order information
++        if func.__module__ == "seaborn.categorical":
++            if "order" not in kwargs:
++                warning = ("Using the {} function without specifying "
++                           "`order` is likely to produce an incorrect "
++                           "plot.".format(func.__name__))
++                warnings.warn(warning)
++            if len(args) == 3 and "hue_order" not in kwargs:
++                warning = ("Using the {} function without specifying "
++                           "`hue_order` is likely to produce an incorrect "
++                           "plot.".format(func.__name__))
++                warnings.warn(warning)
++
+         # Iterate over the data subsets
+         for (row_i, col_j, hue_k), data_ijk in self.facet_data():
+ 
+diff --git a/seaborn/categorical.py b/seaborn/categorical.py
+index f305ca6..62adb9f 100644
+--- a/seaborn/categorical.py
++++ b/seaborn/categorical.py
+@@ -322,7 +322,10 @@ class _CategoricalPlotter(object):
+         def is_categorical(s):
+             try:
+                 # Correct way, but doesnt exist in older Pandas
+-                return pd.core.common.is_categorical_dtype(s)
++                try:
++                    return pd.api.types.is_categorical_dtype(s)
++                except AttributeError:
++                    return pd.core.common.is_categorical_dtype(s)
+             except AttributeError:
+                 # Also works, but feels hackier
+                 return str(s.dtype) == "categorical"
+diff --git a/seaborn/tests/test_axisgrid.py b/seaborn/tests/test_axisgrid.py
+index 0be1130..793b4e7 100644
+--- a/seaborn/tests/test_axisgrid.py
++++ b/seaborn/tests/test_axisgrid.py
+@@ -475,7 +475,7 @@ class TestFacetGrid(PlotTestCase):
+ 
+         x, y = np.arange(10), np.arange(10)
+         df = pd.DataFrame(np.c_[x, y], columns=["x", "y"])
+-        g = ag.FacetGrid(df).map(pointplot, "x", "y")
++        g = ag.FacetGrid(df).map(pointplot, "x", "y", order=x)
+         g.set_xticklabels(step=2)
+         got_x = [int(l.get_text()) for l in g.axes[0, 0].get_xticklabels()]
+         npt.assert_array_equal(x[::2], got_x)
+@@ -727,6 +727,14 @@ class TestFacetGrid(PlotTestCase):
+ 
+         nt.assert_equal(g.axes.shape, (len(df['a'].cat.categories),))
+ 
++    def test_categorical_warning(self):
++
++        g = ag.FacetGrid(self.df, col="b")
++        with warnings.catch_warnings():
++            warnings.resetwarnings()
++            warnings.simplefilter("always")
++            npt.assert_warns(UserWarning, g.map, pointplot, "b", "x")
++
+ 
+ class TestPairGrid(PlotTestCase):
+ 
+-- 
+2.11.0
+
diff -Nru seaborn-0.8.0/debian/patches/0001-Fix-color_cycle-test.patch seaborn-0.8.0/debian/patches/0001-Fix-color_cycle-test.patch
--- seaborn-0.8.0/debian/patches/0001-Fix-color_cycle-test.patch	1970-01-01 02:00:00.000000000 +0200
+++ seaborn-0.8.0/debian/patches/0001-Fix-color_cycle-test.patch	2018-09-23 09:26:00.000000000 +0300
@@ -0,0 +1,53 @@
+From 0a0d0ec4ca4532eb7a08434abe6e701995731a71 Mon Sep 17 00:00:00 2001
+From: Michael Waskom <[email protected]>
+Date: Wed, 11 Apr 2018 14:47:51 -0400
+Subject: Fix color_cycle test
+
+---
+ seaborn/tests/test_palettes.py | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/seaborn/tests/test_palettes.py b/seaborn/tests/test_palettes.py
+index 098a946..10c5259 100644
+--- a/seaborn/tests/test_palettes.py
++++ b/seaborn/tests/test_palettes.py
+@@ -1,16 +1,19 @@
+-import warnings
+ import colorsys
+ import numpy as np
+ import matplotlib as mpl
+ 
+ import nose.tools as nt
+ import numpy.testing as npt
++import matplotlib.pyplot as plt
+ 
+ from .. import palettes, utils, rcmod
+ from ..external import husl
+ from ..xkcd_rgb import xkcd_rgb
+ from ..crayons import crayons
+ 
++from distutils.version import LooseVersion
++mpl_ge_150 = LooseVersion(mpl.__version__) >= '1.5.0'
++
+ 
+ class TestColorPalettes(object):
+ 
+@@ -290,8 +293,10 @@ class TestColorPalettes(object):
+         nt.assert_equal(pal_in, pal_out)
+ 
+     def test_get_color_cycle(self):
+-        with warnings.catch_warnings():
+-            warnings.simplefilter('ignore')
+-            result = utils.get_color_cycle()
+-            expected = mpl.rcParams['axes.color_cycle']
+-        nt.assert_equal(result, expected)
++
++        if mpl_ge_150:
++            colors = [(1., 0., 0.), (0, 1., 0.)]
++            prop_cycle = plt.cycler(color=colors)
++            with plt.rc_context({"axes.prop_cycle": prop_cycle}):
++                result = utils.get_color_cycle()
++                assert result == colors
+-- 
+2.11.0
+
diff -Nru seaborn-0.8.0/debian/patches/series seaborn-0.8.0/debian/patches/series
--- seaborn-0.8.0/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ seaborn-0.8.0/debian/patches/series	2018-09-23 09:30:59.000000000 +0300
@@ -0,0 +1,2 @@
+0001-Add-warning-in-FacetGrid-when-drawing-categorical-pl.patch
+0001-Fix-color_cycle-test.patch

Reply via email to