public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/matplotlib/files/, dev-python/matplotlib/
Date: Wed, 21 Oct 2015 13:41:27 +0000 (UTC)	[thread overview]
Message-ID: <1445434824.e87319182c93cb6b8052275993e6a67cac9bc224.jlec@gentoo> (raw)

commit:     e87319182c93cb6b8052275993e6a67cac9bc224
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 21 10:00:30 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Wed Oct 21 13:40:24 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8731918

dev-python/matplotlib: Backported test fix

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../matplotlib-1.4.3-backport-GH5291-2462.patch    | 126 +++++++++++++++++++++
 dev-python/matplotlib/matplotlib-1.4.3.ebuild      |   4 +
 dev-python/matplotlib/matplotlib-9999.ebuild       |   1 +
 3 files changed, 131 insertions(+)

diff --git a/dev-python/matplotlib/files/matplotlib-1.4.3-backport-GH5291-2462.patch b/dev-python/matplotlib/files/matplotlib-1.4.3-backport-GH5291-2462.patch
new file mode 100644
index 0000000..d6b2ae8
--- /dev/null
+++ b/dev-python/matplotlib/files/matplotlib-1.4.3-backport-GH5291-2462.patch
@@ -0,0 +1,126 @@
+commit f98c4846dc3c15b3d24aafb973764cb9b860d935
+Author: Thomas A Caswell <tcaswell@gmail.com>
+Date:   Sat Jan 10 16:10:29 2015 -0500
+
+    MNT : removed deprecated method/kwargs from patheffects
+    
+    Deprecated in #2462 / 84e0063bd37c629f129d36c548e8ce3a30692cae
+    
+    attn @pelson had to known-fail a test which was using the
+    proxy renderer to verify that PathEffectRender was working
+    correctly.
+
+diff --git a/lib/matplotlib/patheffects.py b/lib/matplotlib/patheffects.py
+index 13f8ce0..19e1c4a 100644
+--- a/lib/matplotlib/patheffects.py
++++ b/lib/matplotlib/patheffects.py
+@@ -10,9 +10,7 @@ from __future__ import (absolute_import, division, print_function,
+ import six
+ 
+ from matplotlib.backend_bases import RendererBase
+-from matplotlib.backends.backend_mixed import MixedModeRenderer
+ import matplotlib.transforms as mtransforms
+-import matplotlib.cbook as cbook
+ from matplotlib.colors import colorConverter
+ import matplotlib.patches as mpatches
+ 
+@@ -42,12 +40,6 @@ class AbstractPathEffect(object):
+         return transform + self._offset_trans.clear().translate(offset_x,
+                                                                 offset_y)
+ 
+-    def get_proxy_renderer(self, renderer):
+-        """Return a PathEffectRenderer instance for this PathEffect."""
+-        cbook.deprecated('v1.4', name='get_proxy_renderer',
+-                         alternative='PathEffectRenderer')
+-        return PathEffectRenderer([self], renderer)
+-
+     def _update_gc(self, gc, new_gc_dict):
+         """
+         Update the given GraphicsCollection with the given
+@@ -219,9 +211,9 @@ class withStroke(Stroke):
+ 
+ class SimplePatchShadow(AbstractPathEffect):
+     """A simple shadow via a filled patch."""
+-    def __init__(self, offset=(2,-2),
+-                 shadow_rgbFace=None, alpha=None, patch_alpha=None,
+-                 rho=0.3, offset_xy=None, **kwargs):
++    def __init__(self, offset=(2, -2),
++                 shadow_rgbFace=None, alpha=None,
++                 rho=0.3, **kwargs):
+         """
+         Parameters
+         ----------
+@@ -241,24 +233,12 @@ class SimplePatchShadow(AbstractPathEffect):
+             :meth:`AbstractPathEffect._update_gc`.
+ 
+         """
+-        if offset_xy is not None:
+-            cbook.deprecated('v1.4', 'The offset_xy keyword is deprecated. '
+-                             'Use the offset keyword instead.')
+-            offset = offset_xy
+         super(SimplePatchShadow, self).__init__(offset)
+ 
+         if shadow_rgbFace is None:
+             self._shadow_rgbFace = shadow_rgbFace
+         else:
+             self._shadow_rgbFace = colorConverter.to_rgba(shadow_rgbFace)
+-        if patch_alpha is not None:
+-            cbook.deprecated('v1.4', 'The patch_alpha keyword is deprecated. '
+-                             'Use the alpha keyword instead. Transform your '
+-                             'patch_alpha by alpha = 1 - patch_alpha')
+-            if alpha is not None:
+-                raise ValueError("Both alpha and patch_alpha were set. "
+-                                 "Just use alpha.")
+-            alpha = 1 - patch_alpha
+ 
+         if alpha is None:
+             alpha = 0.3
+diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py
+index 8298ceb..5af71e5 100644
+--- a/lib/matplotlib/tests/test_patheffects.py
++++ b/lib/matplotlib/tests/test_patheffects.py
+@@ -5,7 +5,8 @@ import six
+ 
+ import numpy as np
+ 
+-from matplotlib.testing.decorators import image_comparison, cleanup
++from matplotlib.testing.decorators import (image_comparison, cleanup,
++                                           knownfailureif)
+ import matplotlib.pyplot as plt
+ import matplotlib.patheffects as path_effects
+ 
+@@ -84,19 +85,7 @@ def test_patheffect3():
+ 
+ 
+ @cleanup
+-def test_PathEffect_get_proxy():
+-    pe = path_effects.AbstractPathEffect()
+-    fig = plt.gcf()
+-    renderer = fig.canvas.get_renderer()
+-
+-    with mock.patch('matplotlib.cbook.deprecated') as dep:
+-        proxy_renderer = pe.get_proxy_renderer(renderer)
+-    assert_equal(proxy_renderer._renderer, renderer)
+-    assert_equal(proxy_renderer._path_effects, [pe])
+-    dep.assert_called()
+-
+-
+-@cleanup
++@knownfailureif(True)
+ def test_PathEffect_points_to_pixels():
+     fig = plt.figure(dpi=150)
+     p1, = plt.plot(range(10))
+@@ -116,11 +105,9 @@ def test_PathEffect_points_to_pixels():
+                  pe_renderer.points_to_pixels(15))
+ 
+ 
+-def test_SimplePatchShadow_offset_xy():
+-    with mock.patch('matplotlib.cbook.deprecated') as dep:
+-        pe = path_effects.SimplePatchShadow(offset_xy=(4, 5))
++def test_SimplePatchShadow_offset():
++    pe = path_effects.SimplePatchShadow(offset=(4, 5))
+     assert_equal(pe._offset, (4, 5))
+-    dep.assert_called()
+ 
+ 
+ @image_comparison(baseline_images=['collection'])

diff --git a/dev-python/matplotlib/matplotlib-1.4.3.ebuild b/dev-python/matplotlib/matplotlib-1.4.3.ebuild
index 78303eb..bf6eb50 100644
--- a/dev-python/matplotlib/matplotlib-1.4.3.ebuild
+++ b/dev-python/matplotlib/matplotlib-1.4.3.ebuild
@@ -126,6 +126,10 @@ use_setup() {
 	fi
 }
 
+PATCHES=(
+	"${FILESDIR}"/${P}-backport-GH5291-2462.patch
+)
+
 python_prepare_all() {
 # Generates test failures, but fedora does it
 #	local PATCHES=(

diff --git a/dev-python/matplotlib/matplotlib-9999.ebuild b/dev-python/matplotlib/matplotlib-9999.ebuild
index 7fd7da9..64665e7 100644
--- a/dev-python/matplotlib/matplotlib-9999.ebuild
+++ b/dev-python/matplotlib/matplotlib-9999.ebuild
@@ -39,6 +39,7 @@ REQUIRED_USE="
 # #456704 -- a lot of py2-only deps
 PY2_USEDEP=$(python_gen_usedep python2_7)
 COMMON_DEPEND="
+	dev-python/cycler[${PYTHON_USEDEP}]
 	>=dev-python/numpy-1.6[${PYTHON_USEDEP}]
 	dev-python/python-dateutil:0[${PYTHON_USEDEP}]
 	dev-python/pytz[${PYTHON_USEDEP}]


             reply	other threads:[~2015-10-21 13:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 13:41 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-15  9:50 [gentoo-commits] repo/gentoo:master commit in: dev-python/matplotlib/files/, dev-python/matplotlib/ Justin Lecher
2016-01-15 12:32 Justin Lecher
2016-01-25  8:31 Justin Lecher
2016-09-11  8:56 David Seifert
2017-05-03  7:37 Michał Górny
2018-03-08 22:37 Andrey Grozin
2020-06-18 10:26 Michał Górny
2020-09-15 22:19 Michał Górny
2021-01-04  9:45 Michał Górny
2021-01-29 10:43 Michał Górny
2021-02-25 13:24 Michał Górny
2021-09-07  7:10 Michał Górny
2022-05-03 10:20 Michał Górny
2023-01-12  6:14 Michał Górny
2023-04-21  4:06 Michał Górny
2023-07-24 10:59 Michał Górny
2023-08-30  4:02 Sam James
2023-09-15 10:11 Michał Górny
2024-05-16 17:29 Michał Górny
2024-07-11 11:59 Michał Górny
2024-11-15 13:50 Nowa Ammerlaan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445434824.e87319182c93cb6b8052275993e6a67cac9bc224.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox