Remove some old patches

This commit is contained in:
Orion Poplawski 2015-02-25 13:35:18 -07:00
parent 81515fc20d
commit c28b38c546
2 changed files with 0 additions and 75 deletions

View File

@ -1,42 +0,0 @@
commit b5d39276af0e3ed80a8565d567a00b02fdafedfb
Author: Thomas Spura <thomas.spura@gmail.com>
Date: Fri Dec 14 13:46:18 2012 +0100
Don't enable pylab mode, when matplotlib is not importable
On a headless server, matplotlib is a unnecessary dependency and the ipython
console will crash badly, when tring to enable %pylab there.
In that case, just don't enable %pylab and ask the user to install matplotlib.
Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=872176
diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py
index d87fcb7..f39ba6a 100644
--- a/IPython/core/interactiveshell.py
+++ b/IPython/core/interactiveshell.py
@@ -2864,6 +2864,10 @@ def enable_pylab(self, gui=None, import_all=True, welcome_message=False):
except KeyError:
error("Backend %r not supported" % gui)
return
+ except ImportError:
+ error("pylab mode doesn't work as matplotlib could not be found." + \
+ "\nIs it installed on the system?")
+ return
self.user_ns.update(ns)
self.user_ns_hidden.update(ns)
# Now we must activate the gui pylab wants to use, and fix %run to take
diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py
index d451d7c..4539c06 100644
--- a/IPython/core/shellapp.py
+++ b/IPython/core/shellapp.py
@@ -203,6 +203,10 @@ def init_gui_pylab(self):
self.log.info("Enabling GUI event loop integration, "
"toolkit=%s" % self.gui)
shell.enable_gui(self.gui)
+ except ImportError:
+ self.log.warn("pylab mode doesn't work as matplotlib could not be found." + \
+ "\nIs it installed on the system?")
+ self.shell.showtraceback()
except Exception:
self.log.warn("GUI event loop or pylab initialization failed")
self.shell.showtraceback()

View File

@ -1,33 +0,0 @@
commit e72159b29f656ccdf0e0643612f80a40ab3ffde4
Author: Fernando Perez <Fernando.Perez@berkeley.edu>
Date: Fri Jun 28 13:45:12 2013 -0500
Change doctest that was failing due to python2/3 print syntax issues.
diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py
index 5d9edcb..28d368f 100644
--- a/IPython/testing/decorators.py
+++ b/IPython/testing/decorators.py
@@ -128,15 +128,17 @@ def make_label_dec(label,ds=None):
--------
A simple labeling decorator:
- >>> slow = make_label_dec('slow')
- >>> print slow.__doc__
- Labels a test as 'slow'.
+ >>> slow = make_label_dec('slow')
+ >>> slow.__doc__
+ "Labels a test as 'slow'."
+
And one that uses multiple labels and a custom docstring:
+
>>> rare = make_label_dec(['slow','hard'],
... "Mix labels 'slow' and 'hard' for rare tests.")
- >>> print rare.__doc__
- Mix labels 'slow' and 'hard' for rare tests.
+ >>> rare.__doc__
+ "Mix labels 'slow' and 'hard' for rare tests."
Now, let's test using this one:
>>> @rare