Skip to content

Commit

Permalink
Merge pull request #5 from tacaswell/unpack_labeled_data_alternative
Browse files Browse the repository at this point in the history
Vetter checks for python and IPython
  • Loading branch information
jankatins committed Sep 10, 2015
2 parents 572c1e2 + 67fda44 commit 59f3917
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,13 +1588,12 @@ def foo(ax, *args, **kwargs)

def param(func):
new_sig = None
ver_info = sys.version_info
# py2.6 compatible version, use line below as soon as we can
python_has_signature = ver_info[0] > 2 and ver_info[1] > 2
# python_has_signature = ver_info.major > 2 and ver_info.minor > 2
python_has_wrapped = ver_info[0] > 2 and ver_info[1] > 1
# python_has_wrapped = ver_info.major > 2 and ver_info.minor > 1
if not python_has_signature:
python_has_signature = major >= 3 and minor1 >= 3
python_has_wrapped = major >= 3 and minor1 >= 2

# if in a legacy version of python and IPython is already imported
# try to use their back-ported signature
if not python_has_signature and 'IPython' in sys.modules:
try:
import IPython.utils.signatures
signature = IPython.utils.signatures.signature
Expand Down

0 comments on commit 59f3917

Please sign in to comment.