[h5py] 434/455: Patch for ipy completer

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit ff9d4ad29621aa11221063764752bb9fe757ad51
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Mon Mar 1 22:09:37 2010 +0000

    Patch for ipy completer
---
 h5py/_ipy_completer.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/h5py/_ipy_completer.py b/h5py/_ipy_completer.py
index 110076e..15ee213 100644
--- a/h5py/_ipy_completer.py
+++ b/h5py/_ipy_completer.py
@@ -40,7 +40,8 @@ import re
 
 try:
     from IPython.utils import generics
-    from IPython.core.ipapi import TryNext, get as ipget
+    from IPython.core.error import TryNext
+    from IPython.core.ipapi import get as ipget
 except ImportError:
     # support <ipython-0.11
     from IPython import generics
@@ -75,9 +76,9 @@ def h5py_item_completer(context, command):
 
     path, target = posixpath.split(item)
     if path:
-        items = (posixpath.join(path, name) for name in obj[path].iternames())
+        items = (posixpath.join(path, name) for name in obj[path].iterkeys())
     else:
-        items = obj.iternames()
+        items = obj.iterkeys()
     items = list(items)
 
     readline.set_completer_delims(' \t\n`!@#$^&*()=+[{]}\\|;:\'",<>?')
@@ -107,7 +108,11 @@ def h5py_attr_completer(context, command):
     except TryNext:
         pass
 
-    omit__names = ipget().options.readline_omit__names
+    try:
+        omit__names = ipget().readline_omit__names
+    except AttributeError:
+        # support <ipython-0.11
+        omit__names = ipget().options.readline_omit__names
     if omit__names == 1:
         attrs = [a for a in attrs if not a.startswith('__')]
     elif omit__names == 2:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list