File tree 3 files changed +6
-6
lines changed 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ Breaking changes
34
34
- :py:func: `~xarray.concat ` now requires the ``dim `` argument. Its ``indexers ``, ``mode ``
35
35
and ``concat_over `` kwargs have now been removed.
36
36
By `Deepak Cherian <https://github.com/dcherian >`_
37
+ - Passing a list of colors in ``cmap `` will now raise an error, having been deprecated since
38
+ v0.6.1.
37
39
- Most xarray objects now define ``__slots__ ``. This reduces overall RAM usage by ~22%
38
40
(not counting the underlying numpy buffers); on CPython 3.7/x64, a trivial DataArray
39
41
has gone down from 1.9kB to 1.5kB.
Original file line number Diff line number Diff line change @@ -737,11 +737,9 @@ def _process_cmap_cbar_kwargs(
737
737
# we should not be getting a list of colors in cmap anymore
738
738
# is there a better way to do this test?
739
739
if isinstance (cmap , (list , tuple )):
740
- warnings . warn (
740
+ raise ValueError (
741
741
"Specifying a list of colors in cmap is deprecated. "
742
- "Use colors keyword instead." ,
743
- DeprecationWarning ,
744
- stacklevel = 3 ,
742
+ "Use colors keyword instead."
745
743
)
746
744
747
745
cmap_kwargs = {
Original file line number Diff line number Diff line change @@ -1320,8 +1320,8 @@ def test_cmap_and_color_both(self):
1320
1320
with pytest .raises (ValueError ):
1321
1321
self .plotmethod (colors = "k" , cmap = "RdBu" )
1322
1322
1323
- def list_of_colors_in_cmap_deprecated (self ):
1324
- with pytest . raises ( Exception ):
1323
+ def list_of_colors_in_cmap_raises_error (self ):
1324
+ with raises_regex ( ValueError , "list of colors" ):
1325
1325
self .plotmethod (cmap = ["k" , "b" ])
1326
1326
1327
1327
@pytest .mark .slow
You can’t perform that action at this time.
0 commit comments