Pick upstream patch for fixing the gdk backend #1231748

This commit is contained in:
Thomas Spura 2015-09-10 08:53:36 +02:00
parent 13c730c10e
commit 5ddd160fd3
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From 2e445c2c4f66f1e0de9779a3fd966aaf8d8ed2c5 Mon Sep 17 00:00:00 2001
From: Thomas A Caswell <tcaswell@gmail.com>
Date: Sun, 17 May 2015 23:45:44 -0400
Subject: [PATCH] Merge pull request #4439 from tswsl1989/restrict_dict_gdk
FIX : Import cbook.restrict_dict into backend_gdk
---
lib/matplotlib/backends/backend_gdk.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/backends/backend_gdk.py b/lib/matplotlib/backends/backend_gdk.py
index fc705fe..024c27e 100644
--- a/lib/matplotlib/backends/backend_gdk.py
+++ b/lib/matplotlib/backends/backend_gdk.py
@@ -26,7 +26,7 @@ def fn_name(): return sys._getframe(1).f_code.co_name
from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import RendererBase, GraphicsContextBase, \
FigureManagerBase, FigureCanvasBase
-from matplotlib.cbook import is_string_like
+from matplotlib.cbook import is_string_like, restrict_dict
from matplotlib.figure import Figure
from matplotlib.mathtext import MathTextParser
from matplotlib.transforms import Affine2D
@@ -477,7 +477,7 @@ def _print_image(self, filename, format, *args, **kwargs):
# set the default quality, if we are writing a JPEG.
# http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#method-gdkpixbuf--save
- options = cbook.restrict_dict(kwargs, ['quality'])
+ options = restrict_dict(kwargs, ['quality'])
if format in ['jpg','jpeg']:
if 'quality' not in options:
options['quality'] = rcParams['savefig.jpeg_quality']

View File

@ -46,7 +46,7 @@
Name: python-matplotlib
Version: 1.4.3
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Python 2D plotting library
Group: Development/Libraries
# qt4_editor backend is MIT
@ -62,6 +62,7 @@ Patch2: 20_matplotlibrc_path_search_fix.patch
Patch3: 40_bts608939_draw_markers_description.patch
Patch4: 50_bts608942_spaces_in_param_args.patch
Patch5: 70_bts720549_try_StayPuft_for_xkcd.patch
Patch6: matplotlib-1.4.3-cbook.restrict_dict.patch
BuildRequires: agg-devel
BuildRequires: freetype-devel
@ -334,6 +335,7 @@ sed -i 's/\(USE_FONTCONFIG = \)False/\1True/' lib/matplotlib/font_manager.py
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
chmod -x lib/matplotlib/mpl-data/images/*.svg
@ -523,6 +525,9 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} \
%endif
%changelog
* Sun Nov 15 2015 Thomas Spura <tomspur@fedoraproject.org> - 1.4.3-8
- Pick upstream patch for fixing the gdk backend #1231748
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5