|
117 | 117 | ): |
118 | 118 | CMAPS_DIVERGING[_cmap_diverging.lower()] = _cmap_diverging.lower() |
119 | 119 | CMAPS_REMOVED = { |
120 | | - 'Blue0': '0.6', |
121 | | - 'Cool': '0.6', |
122 | | - 'Warm': '0.6', |
123 | | - 'Hot': '0.6', |
124 | | - 'Floral': '0.6', |
125 | | - 'Contrast': '0.6', |
126 | | - 'Sharp': '0.6', |
127 | | - 'Viz': '0.6', |
| 120 | + 'Blue0': '0.6.0', |
| 121 | + 'Cool': '0.6.0', |
| 122 | + 'Warm': '0.6.0', |
| 123 | + 'Hot': '0.6.0', |
| 124 | + 'Floral': '0.6.0', |
| 125 | + 'Contrast': '0.6.0', |
| 126 | + 'Sharp': '0.6.0', |
| 127 | + 'Viz': '0.6.0', |
128 | 128 | } |
129 | 129 | CMAPS_RENAMED = { |
130 | | - 'GrayCycle': ('MonoCycle', '0.6'), |
131 | | - 'Blue1': ('Blues1', '0.7'), |
132 | | - 'Blue2': ('Blues2', '0.7'), |
133 | | - 'Blue3': ('Blues3', '0.7'), |
134 | | - 'Blue4': ('Blues4', '0.7'), |
135 | | - 'Blue5': ('Blues5', '0.7'), |
136 | | - 'Blue6': ('Blues6', '0.7'), |
137 | | - 'Blue7': ('Blues7', '0.7'), |
138 | | - 'Blue8': ('Blues8', '0.7'), |
139 | | - 'Blue9': ('Blues9', '0.7'), |
140 | | - 'Green1': ('Greens1', '0.7'), |
141 | | - 'Green2': ('Greens2', '0.7'), |
142 | | - 'Green3': ('Greens3', '0.7'), |
143 | | - 'Green4': ('Greens4', '0.7'), |
144 | | - 'Green5': ('Greens5', '0.7'), |
145 | | - 'Green6': ('Greens6', '0.7'), |
146 | | - 'Green7': ('Greens7', '0.7'), |
147 | | - 'Green8': ('Greens8', '0.7'), |
148 | | - 'Orange1': ('Yellows1', '0.7'), |
149 | | - 'Orange2': ('Yellows2', '0.7'), |
150 | | - 'Orange3': ('Yellows3', '0.7'), |
151 | | - 'Orange4': ('Oranges2', '0.7'), |
152 | | - 'Orange5': ('Oranges1', '0.7'), |
153 | | - 'Orange6': ('Oranges3', '0.7'), |
154 | | - 'Orange7': ('Oranges4', '0.7'), |
155 | | - 'Orange8': ('Yellows4', '0.7'), |
156 | | - 'Brown1': ('Browns1', '0.7'), |
157 | | - 'Brown2': ('Browns2', '0.7'), |
158 | | - 'Brown3': ('Browns3', '0.7'), |
159 | | - 'Brown4': ('Browns4', '0.7'), |
160 | | - 'Brown5': ('Browns5', '0.7'), |
161 | | - 'Brown6': ('Browns6', '0.7'), |
162 | | - 'Brown7': ('Browns7', '0.7'), |
163 | | - 'Brown8': ('Browns8', '0.7'), |
164 | | - 'Brown9': ('Browns9', '0.7'), |
165 | | - 'RedPurple1': ('Reds1', '0.7'), |
166 | | - 'RedPurple2': ('Reds2', '0.7'), |
167 | | - 'RedPurple3': ('Reds3', '0.7'), |
168 | | - 'RedPurple4': ('Reds4', '0.7'), |
169 | | - 'RedPurple5': ('Reds5', '0.7'), |
170 | | - 'RedPurple6': ('Purples1', '0.7'), |
171 | | - 'RedPurple7': ('Purples2', '0.7'), |
172 | | - 'RedPurple8': ('Purples3', '0.7'), |
| 130 | + 'GrayCycle': ('MonoCycle', '0.6.0'), |
| 131 | + 'Blue1': ('Blues1', '0.7.0'), |
| 132 | + 'Blue2': ('Blues2', '0.7.0'), |
| 133 | + 'Blue3': ('Blues3', '0.7.0'), |
| 134 | + 'Blue4': ('Blues4', '0.7.0'), |
| 135 | + 'Blue5': ('Blues5', '0.7.0'), |
| 136 | + 'Blue6': ('Blues6', '0.7.0'), |
| 137 | + 'Blue7': ('Blues7', '0.7.0'), |
| 138 | + 'Blue8': ('Blues8', '0.7.0'), |
| 139 | + 'Blue9': ('Blues9', '0.7.0'), |
| 140 | + 'Green1': ('Greens1', '0.7.0'), |
| 141 | + 'Green2': ('Greens2', '0.7.0'), |
| 142 | + 'Green3': ('Greens3', '0.7.0'), |
| 143 | + 'Green4': ('Greens4', '0.7.0'), |
| 144 | + 'Green5': ('Greens5', '0.7.0'), |
| 145 | + 'Green6': ('Greens6', '0.7.0'), |
| 146 | + 'Green7': ('Greens7', '0.7.0'), |
| 147 | + 'Green8': ('Greens8', '0.7.0'), |
| 148 | + 'Orange1': ('Yellows1', '0.7.0'), |
| 149 | + 'Orange2': ('Yellows2', '0.7.0'), |
| 150 | + 'Orange3': ('Yellows3', '0.7.0'), |
| 151 | + 'Orange4': ('Oranges2', '0.7.0'), |
| 152 | + 'Orange5': ('Oranges1', '0.7.0'), |
| 153 | + 'Orange6': ('Oranges3', '0.7.0'), |
| 154 | + 'Orange7': ('Oranges4', '0.7.0'), |
| 155 | + 'Orange8': ('Yellows4', '0.7.0'), |
| 156 | + 'Brown1': ('Browns1', '0.7.0'), |
| 157 | + 'Brown2': ('Browns2', '0.7.0'), |
| 158 | + 'Brown3': ('Browns3', '0.7.0'), |
| 159 | + 'Brown4': ('Browns4', '0.7.0'), |
| 160 | + 'Brown5': ('Browns5', '0.7.0'), |
| 161 | + 'Brown6': ('Browns6', '0.7.0'), |
| 162 | + 'Brown7': ('Browns7', '0.7.0'), |
| 163 | + 'Brown8': ('Browns8', '0.7.0'), |
| 164 | + 'Brown9': ('Browns9', '0.7.0'), |
| 165 | + 'RedPurple1': ('Reds1', '0.7.0'), |
| 166 | + 'RedPurple2': ('Reds2', '0.7.0'), |
| 167 | + 'RedPurple3': ('Reds3', '0.7.0'), |
| 168 | + 'RedPurple4': ('Reds4', '0.7.0'), |
| 169 | + 'RedPurple5': ('Reds5', '0.7.0'), |
| 170 | + 'RedPurple6': ('Purples1', '0.7.0'), |
| 171 | + 'RedPurple7': ('Purples2', '0.7.0'), |
| 172 | + 'RedPurple8': ('Purples3', '0.7.0'), |
173 | 173 | } |
174 | 174 |
|
175 | 175 | # Color constants |
@@ -1584,11 +1584,11 @@ def from_list(cls, *args, **kwargs): |
1584 | 1584 |
|
1585 | 1585 | # Deprecated |
1586 | 1586 | to_listed = warnings._rename_objs( |
1587 | | - '0.8', |
| 1587 | + '0.8.0', |
1588 | 1588 | to_listed=to_discrete |
1589 | 1589 | ) |
1590 | 1590 | concatenate, punched, truncated, updated = warnings._rename_objs( |
1591 | | - '0.6', |
| 1591 | + '0.6.0', |
1592 | 1592 | concatenate=append, |
1593 | 1593 | punched=cut, |
1594 | 1594 | truncated=truncate, |
@@ -1864,7 +1864,7 @@ def from_file(cls, path, *, warn_on_failure=False): |
1864 | 1864 |
|
1865 | 1865 | # Rename methods |
1866 | 1866 | concatenate, truncated, updated = warnings._rename_objs( |
1867 | | - '0.6', |
| 1867 | + '0.6.0', |
1868 | 1868 | concatenate=append, |
1869 | 1869 | truncated=truncate, |
1870 | 1870 | updated=copy, |
@@ -2077,7 +2077,7 @@ def to_continuous(self, name=None, **kwargs): |
2077 | 2077 |
|
2078 | 2078 | @classmethod |
2079 | 2079 | @docstring._snippet_manager |
2080 | | - @warnings._rename_kwargs('0.7', fade='saturation', shade='luminance') |
| 2080 | + @warnings._rename_kwargs('0.7.0', fade='saturation', shade='luminance') |
2081 | 2081 | def from_color(cls, *args, **kwargs): |
2082 | 2082 | """ |
2083 | 2083 | Return a simple monochromatic "sequential" colormap that blends from white |
@@ -2272,7 +2272,7 @@ def from_list(cls, *args, adjust_grays=True, **kwargs): |
2272 | 2272 |
|
2273 | 2273 | # Deprecated |
2274 | 2274 | to_linear_segmented = warnings._rename_objs( |
2275 | | - '0.8', |
| 2275 | + '0.8.0', |
2276 | 2276 | to_linear_segmented=to_continuous |
2277 | 2277 | ) |
2278 | 2278 |
|
@@ -2341,7 +2341,7 @@ class DiscreteNorm(mcolors.BoundaryNorm): |
2341 | 2341 | # test for class membership, crucially including _process_values(), which |
2342 | 2342 | # if it doesn't detect BoundaryNorm will try to use DiscreteNorm.inverse(). |
2343 | 2343 | @warnings._rename_kwargs( |
2344 | | - '0.7', extend='unique', descending='DiscreteNorm(descending_levels)' |
| 2344 | + '0.7.0', extend='unique', descending='DiscreteNorm(descending_levels)' |
2345 | 2345 | ) |
2346 | 2346 | def __init__(self, levels, norm=None, unique=None, step=None, clip=False): |
2347 | 2347 | """ |
@@ -3026,13 +3026,14 @@ def _translate_deprecated(self, key): |
3026 | 3026 | if not self._has_item(test) and test in CMAPS_REMOVED: |
3027 | 3027 | version = CMAPS_REMOVED[test] |
3028 | 3028 | raise ValueError( |
3029 | | - f'Proplot colormap {key!r} was removed in version {version}.' |
| 3029 | + f'The colormap name {key!r} was removed in version {version}.' |
3030 | 3030 | ) |
3031 | 3031 | if not self._has_item(test) and test in CMAPS_RENAMED: |
3032 | 3032 | test_new, version = CMAPS_RENAMED[test] |
3033 | 3033 | warnings._warn_proplot( |
3034 | | - f'Colormap {test!r} was renamed in version {version} and will be ' |
3035 | | - f'removed in a future release. Please use {test_new!r} instead.' # noqa: E501 |
| 3034 | + f'The colormap name {test!r} was deprecated in version {version} ' |
| 3035 | + f'and may be removed in {warnings._next_release()}. Please use ' |
| 3036 | + f'the colormap name {test_new!r} instead.' |
3036 | 3037 | ) |
3037 | 3038 | key = re.sub(test, test_new, key, flags=re.IGNORECASE) |
3038 | 3039 | return key |
@@ -3118,7 +3119,7 @@ def _set_item(self, key, value): |
3118 | 3119 | PerceptuallyUniformColormap, |
3119 | 3120 | LinearSegmentedNorm, |
3120 | 3121 | ) = warnings._rename_objs( # noqa: E501 |
3121 | | - '0.8', |
| 3122 | + '0.8.0', |
3122 | 3123 | ListedColormap=DiscreteColormap, |
3123 | 3124 | LinearSegmentedColormap=ContinuousColormap, |
3124 | 3125 | PerceptuallyUniformColormap=PerceptualColormap, |
|
0 commit comments