[h5py] 318/455: Support for IPython trunk
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:46 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 f4ee96980a975b9f4e979efa44fa33c65dbf045e
Author: andrewcollette <andrew.collette at gmail.com>
Date: Sat Oct 3 03:34:13 2009 +0000
Support for IPython trunk
---
h5py/__init__.py | 15 ++++++++++-----
h5py/_ipy_completer.py | 9 +++++++--
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/h5py/__init__.py b/h5py/__init__.py
index 8573f51..7e370f8 100644
--- a/h5py/__init__.py
+++ b/h5py/__init__.py
@@ -48,10 +48,15 @@ __all__ = ['h5', 'h5f', 'h5g', 'h5s', 'h5t', 'h5d', 'h5a', 'h5p', 'h5r',
'Datatype', 'AttributeManager', 'H5Error', 'get_config', 'is_hdf5']
try:
- import IPython as _IP
- if _IP.ipapi.get() is not None:
- import _ipy_completer
- _ipy_completer.activate()
+ try:
+ import IPython.core.ipapi as _IP
+ except ImportError:
+ # support <ipython-0.11
+ import IPython.ipapi as _IP
+ if _IP.get() is not None:
+ import _ipy_completer
+ _ipy_completer.activate()
except Exception:
- pass
+ pass
+
diff --git a/h5py/_ipy_completer.py b/h5py/_ipy_completer.py
index 8a0a172..110076e 100644
--- a/h5py/_ipy_completer.py
+++ b/h5py/_ipy_completer.py
@@ -38,8 +38,13 @@ as should::
import posixpath
import re
-from IPython import generics
-from IPython.ipapi import TryNext, get as ipget
+try:
+ from IPython.utils import generics
+ from IPython.core.ipapi import TryNext, get as ipget
+except ImportError:
+ # support <ipython-0.11
+ from IPython import generics
+ from IPython.ipapi import TryNext, get as ipget
import readline
--
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