Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cea68c5

Browse files
committed
removed deprecated code from gridspec.py and _fontconfig_patterns.py
1 parent 04e1332 commit cea68c5

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Removal change template
2+
~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
@_api.delete_parameter("3.7", "raw") was removed from gridpec.py
5+
and
6+
_api.warn_deprecated function removed from _fontcongif_patterns.py

lib/matplotlib/_fontconfig_pattern.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,7 @@ def parse_fontconfig_pattern(pattern):
9898
for prop in parse.get("properties", []):
9999
if len(prop) == 1:
100100
if prop[0] not in _CONSTANTS:
101-
_api.warn_deprecated(
102-
"3.7", message=f"Support for unknown constants "
103-
f"({prop[0]!r}) is deprecated since %(since)s and "
104-
f"will be removed %(removal)s.")
105-
continue
101+
106102
prop = _CONSTANTS[prop[0]]
107103
k, *v = prop
108104
props.setdefault(k, []).extend(map(_value_unescape, v))

lib/matplotlib/gridspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def get_height_ratios(self):
141141
"""
142142
return self._row_height_ratios
143143

144-
@_api.delete_parameter("3.7", "raw")
144+
145145
def get_grid_positions(self, fig, raw=False):
146146
"""
147147
Return the positions of the grid cells in figure coordinates.

lib/matplotlib/gridspec.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class GridSpecBase:
3030
def set_height_ratios(self, height_ratios: ArrayLike | None) -> None: ...
3131
def get_height_ratios(self) -> ArrayLike: ...
3232
def get_grid_positions(
33-
self, fig: Figure, raw: bool = ...
33+
self, fig: Figure, raw: bool = False
3434
) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]: ...
3535
@staticmethod
3636
def _check_gridspec_exists(figure: Figure, nrows: int, ncols: int) -> GridSpec: ...

0 commit comments

Comments
 (0)