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 92ffe7d

Browse filesBrowse files
committed
Update & deprecate mpl_toolkits.{gtk,excel}tools.
- On Py2, np.rec.fromarrays cannot take a unicode string as names (but this module __future__-imports unicode_strings). - CallbackRegistry ctor signature has changed.
1 parent 2303df6 commit 92ffe7d
Copy full SHA for 92ffe7d

File tree

Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-2
lines changed

‎lib/mpl_toolkits/exceltools.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/exceltools.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
import matplotlib.mlab as mlab
3434

3535

36+
cbook.warn_deprecated("2.0", name="mpl_toolkits.exceltools",
37+
alternative="openpyxl", obj_type="module")
38+
39+
3640
def xlformat_factory(format):
3741
"""
3842
copy the format, perform any overrides, and attach an xlstyle instance

‎lib/mpl_toolkits/gtktools.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/gtktools.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
from matplotlib.externals import six
3838
from matplotlib.externals.six.moves import xrange, zip
39+
from matplotlib.cbook import warn_deprecated
3940

4041
import copy
4142
import gtk, gobject
@@ -44,6 +45,9 @@
4445
import matplotlib.mlab as mlab
4546

4647

48+
warn_deprecated("2.0", name="mpl_toolkits.gtktools", obj_type="module")
49+
50+
4751
def error_message(msg, parent=None, title=None):
4852
"""
4953
create an error message dialog with string msg. Optionally set
@@ -387,7 +391,7 @@ def __init__(self, r, formatd=None, stringd=None):
387391
formatd = mlab.get_formatd(r)
388392

389393
self.stringd = stringd
390-
self.callbacks = cbook.CallbackRegistry(['cell_changed'])
394+
self.callbacks = cbook.CallbackRegistry()
391395

392396
self.r = r
393397

@@ -599,7 +603,7 @@ def edit_recarray(r, formatd=None, stringd=None, constant=None, autowin=True):
599603
clientid = list(xrange(N)) # ints
600604

601605
r = np.rec.fromarrays([clientid, dates, weekdays, gains, prices, up],
602-
names='clientid,date,weekdays,gains,prices,up')
606+
names=str('clientid,date,weekdays,gains,prices,up'))
603607

604608
# some custom formatters
605609
formatd = mlab.get_formatd(r)

0 commit comments

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