File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ Breaking changes
3434- :py:func: `~xarray.concat ` now requires the ``dim `` argument. Its ``indexers ``, ``mode ``
3535 and ``concat_over `` kwargs have now been removed.
3636 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.
3739- Most xarray objects now define ``__slots__ ``. This reduces overall RAM usage by ~22%
3840 (not counting the underlying numpy buffers); on CPython 3.7/x64, a trivial DataArray
3941 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(
737737 # we should not be getting a list of colors in cmap anymore
738738 # is there a better way to do this test?
739739 if isinstance (cmap , (list , tuple )):
740- warnings . warn (
740+ raise ValueError (
741741 "Specifying a list of colors in cmap is deprecated. "
742- "Use colors keyword instead." ,
743- DeprecationWarning ,
744- stacklevel = 3 ,
742+ "Use colors keyword instead."
745743 )
746744
747745 cmap_kwargs = {
Original file line number Diff line number Diff line change @@ -1320,8 +1320,8 @@ def test_cmap_and_color_both(self):
13201320 with pytest .raises (ValueError ):
13211321 self .plotmethod (colors = "k" , cmap = "RdBu" )
13221322
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" ):
13251325 self .plotmethod (cmap = ["k" , "b" ])
13261326
13271327 @pytest .mark .slow
You can’t perform that action at this time.
0 commit comments