Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8466d11

Browse filesBrowse files
committed
Expire deprecations in lines and patches
1 parent c2f39dd commit 8466d11
Copy full SHA for 8466d11

File tree

Expand file treeCollapse file tree

3 files changed

+8
-58
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+8
-58
lines changed
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Removal of deprecated methods and properties in ``lines`` and ``patches``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The deperecated properties ``validCap`` and ``validJoin`` have been removed
5+
from `~.Line2D` and `~.Patch` as the validation is centralized in ``rcsetup``.
6+
The deprecated methods ``get_dpi_cor`` and ``set_dpi_cor`` have been removed
7+
from `~.FancyArrowPatch` as the parameter ``dpi_cor`` is removed.

‎lib/matplotlib/lines.py

Copy file name to clipboardExpand all lines: lib/matplotlib/lines.py
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,6 @@ class Line2D(Artist):
252252

253253
zorder = 2
254254

255-
@_api.deprecated("3.4")
256-
@_api.classproperty
257-
def validCap(cls):
258-
return tuple(cs.value for cs in CapStyle)
259-
260-
@_api.deprecated("3.4")
261-
@_api.classproperty
262-
def validJoin(cls):
263-
return tuple(js.value for js in JoinStyle)
264-
265255
def __str__(self):
266256
if self._label != "":
267257
return f"Line2D({self._label})"

‎lib/matplotlib/patches.py

Copy file name to clipboardExpand all lines: lib/matplotlib/patches.py
+1-48Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ class Patch(artist.Artist):
4040
"""
4141
zorder = 1
4242

43-
@_api.deprecated("3.4")
44-
@_api.classproperty
45-
def validCap(cls):
46-
with _api.suppress_matplotlib_deprecation_warning():
47-
return mlines.Line2D.validCap
48-
49-
@_api.deprecated("3.4")
50-
@_api.classproperty
51-
def validJoin(cls):
52-
with _api.suppress_matplotlib_deprecation_warning():
53-
return mlines.Line2D.validJoin
54-
5543
# Whether to draw an edge by default. Set on a
5644
# subclass-by-subclass basis.
5745
_edge_default = False
@@ -4229,13 +4217,11 @@ def __str__(self):
42294217
return f"{type(self).__name__}({self._path_original})"
42304218

42314219
@docstring.dedent_interpd
4232-
@_api.delete_parameter("3.4", "dpi_cor")
42334220
def __init__(self, posA=None, posB=None, path=None,
42344221
arrowstyle="simple", connectionstyle="arc3",
42354222
patchA=None, patchB=None,
42364223
shrinkA=2, shrinkB=2,
42374224
mutation_scale=1, mutation_aspect=1,
4238-
dpi_cor=1,
42394225
**kwargs):
42404226
"""
42414227
There are two ways for defining an arrow:
@@ -4291,10 +4277,6 @@ def __init__(self, posA=None, posB=None, path=None,
42914277
the mutation and the mutated box will be stretched by the inverse
42924278
of it.
42934279
4294-
dpi_cor : float, default: 1
4295-
dpi_cor is currently used for linewidth-related things and shrink
4296-
factor. Mutation scale is affected by this. Deprecated.
4297-
42984280
Other Parameters
42994281
----------------
43004282
**kwargs : `.Patch` properties, optional
@@ -4335,32 +4317,7 @@ def __init__(self, posA=None, posB=None, path=None,
43354317
self._mutation_scale = mutation_scale
43364318
self._mutation_aspect = mutation_aspect
43374319

4338-
self._dpi_cor = dpi_cor
4339-
4340-
@_api.deprecated("3.4")
4341-
def set_dpi_cor(self, dpi_cor):
4342-
"""
4343-
dpi_cor is currently used for linewidth-related things and
4344-
shrink factor. Mutation scale is affected by this.
4345-
4346-
Parameters
4347-
----------
4348-
dpi_cor : float
4349-
"""
4350-
self._dpi_cor = dpi_cor
4351-
self.stale = True
4352-
4353-
@_api.deprecated("3.4")
4354-
def get_dpi_cor(self):
4355-
"""
4356-
dpi_cor is currently used for linewidth-related things and
4357-
shrink factor. Mutation scale is affected by this.
4358-
4359-
Returns
4360-
-------
4361-
scalar
4362-
"""
4363-
return self._dpi_cor
4320+
self._dpi_cor = 1.0
43644321

43654322
def set_positions(self, posA, posB):
43664323
"""
@@ -4575,7 +4532,6 @@ def __str__(self):
45754532
(self.xy1[0], self.xy1[1], self.xy2[0], self.xy2[1])
45764533

45774534
@docstring.dedent_interpd
4578-
@_api.delete_parameter("3.4", "dpi_cor")
45794535
def __init__(self, xyA, xyB, coordsA, coordsB=None,
45804536
axesA=None, axesB=None,
45814537
arrowstyle="-",
@@ -4587,7 +4543,6 @@ def __init__(self, xyA, xyB, coordsA, coordsB=None,
45874543
mutation_scale=10.,
45884544
mutation_aspect=None,
45894545
clip_on=False,
4590-
dpi_cor=1.,
45914546
**kwargs):
45924547
"""
45934548
Connect point *xyA* in *coordsA* with point *xyB* in *coordsB*.
@@ -4677,8 +4632,6 @@ def __init__(self, xyA, xyB, coordsA, coordsB=None,
46774632
mutation_aspect=mutation_aspect,
46784633
clip_on=clip_on,
46794634
**kwargs)
4680-
self._dpi_cor = dpi_cor
4681-
46824635
# if True, draw annotation only if self.xy is inside the axes
46834636
self._annotation_clip = None
46844637

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.