From 51e4944fe1586912112d76abd44af7b6f0aa6ddc Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 10 May 2018 15:48:43 +0100 Subject: [PATCH 1/2] Add a newline before deprecation messages --- lib/matplotlib/cbook/deprecation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/cbook/deprecation.py b/lib/matplotlib/cbook/deprecation.py index 9c8c83225ba7..30accf7c1ca5 100644 --- a/lib/matplotlib/cbook/deprecation.py +++ b/lib/matplotlib/cbook/deprecation.py @@ -100,6 +100,7 @@ def warn_deprecated( """ message = _generate_deprecation_message( since, message, name, alternative, pending, obj_type, removal=removal) + message = '\n' + message warnings.warn(message, mplDeprecation, stacklevel=2) From 2cdb48403f270ea412c40e439d8139517af351e1 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 10 May 2018 15:48:55 +0100 Subject: [PATCH 2/2] Add deprecation messages for unused kwargs in FancyArrowPatch Fix variable name --- lib/matplotlib/patches.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 0b0b2708b394..575abfcd5123 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -4060,6 +4060,20 @@ def __init__(self, posA=None, posB=None, Valid kwargs are: %(Patch)s """ + if arrow_transmuter is not None: + cbook.warn_deprecated( + 3.0, + message=('The "arrow_transmuter" keyword argument is not used,' + ' and will be removed in Matplotlib 3.1'), + name='arrow_transmuter', + obj_type='keyword argument') + if connector is not None: + cbook.warn_deprecated( + 3.0, + message=('The "connector" keyword argument is not used,' + ' and will be removed in Matplotlib 3.1'), + name='connector', + obj_type='keyword argument') Patch.__init__(self, **kwargs) if posA is not None and posB is not None and path is None: