Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bfe4de0

Browse files
committed
add IPython.version_info
always-comparable tuple for IPython versions Note that types for each slot must never differ, due to Python 3 breaking loose comparisons (0 is used for base micro, never '')
1 parent 6ad4114 commit bfe4de0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

IPython/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
__author__ += author + ' <' + email + '>\n'
5858
__license__ = release.license
5959
__version__ = release.version
60+
version_info = release.version_info
6061

6162
def embed_kernel(module=None, local_ns=None, **kwargs):
6263
"""Embed and start an IPython kernel in a given scope.

IPython/core/release.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# version
2222
_version_major = 0
2323
_version_minor = 14
24-
_version_micro = '' # use '' for first of series, number for 1 and above
24+
_version_micro = 0 # use 0 for first of series, number for 1 and above
2525
_version_extra = 'dev'
2626
#_version_extra = 'rc1'
2727
# _version_extra = '' # Uncomment this for full releases
@@ -36,6 +36,7 @@
3636
__version__ = '.'.join(map(str, _ver))
3737

3838
version = __version__ # backwards compatibility name
39+
version_info = (_version_major, _version_minor, _version_micro, _version_extra)
3940

4041
description = "IPython: Productive Interactive Computing"
4142

0 commit comments

Comments
 (0)