Skip to content

Commit

Permalink
Merge pull request #150 from cphyc/fix-ipython-version-parsing
Browse files Browse the repository at this point in the history
Support parsing of IPython dev version
  • Loading branch information
davidbrochart committed Jun 2, 2021
2 parents d802398 + bc81856 commit b85aaf3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nbclient/util.py
Expand Up @@ -13,7 +13,11 @@ def check_ipython() -> None:
# original from vaex/asyncio.py
IPython = sys.modules.get('IPython')
if IPython:
IPython_version = tuple(map(int, IPython.__version__.split('.'))) # type: ignore
version_str = IPython.__version__ # type: ignore
# We get rid of any trailing ".dev"
version_str = version_str.replace(".dev", "")

IPython_version = tuple(map(int, version_str.split('.')))
if IPython_version < (7, 0, 0):
raise RuntimeError(f'You are using IPython {IPython.__version__} ' # type: ignore
'while we require 7.0.0+, please update IPython')
Expand Down

0 comments on commit b85aaf3

Please sign in to comment.