Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 59f3917

Browse filesBrowse files
committed
Merge pull request #5 from tacaswell/unpack_labeled_data_alternative
Vetter checks for python and IPython
2 parents 572c1e2 + 67fda44 commit 59f3917
Copy full SHA for 59f3917

File tree

1 file changed

+6
-7
lines changed
Filter options

1 file changed

+6
-7
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+6-7Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,13 +1588,12 @@ def foo(ax, *args, **kwargs)
15881588

15891589
def param(func):
15901590
new_sig = None
1591-
ver_info = sys.version_info
1592-
# py2.6 compatible version, use line below as soon as we can
1593-
python_has_signature = ver_info[0] > 2 and ver_info[1] > 2
1594-
# python_has_signature = ver_info.major > 2 and ver_info.minor > 2
1595-
python_has_wrapped = ver_info[0] > 2 and ver_info[1] > 1
1596-
# python_has_wrapped = ver_info.major > 2 and ver_info.minor > 1
1597-
if not python_has_signature:
1591+
python_has_signature = major >= 3 and minor1 >= 3
1592+
python_has_wrapped = major >= 3 and minor1 >= 2
1593+
1594+
# if in a legacy version of python and IPython is already imported
1595+
# try to use their back-ported signature
1596+
if not python_has_signature and 'IPython' in sys.modules:
15981597
try:
15991598
import IPython.utils.signatures
16001599
signature = IPython.utils.signatures.signature

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.