8000 PRF: only try to use IPython if already imported · matplotlib/matplotlib@67fda44 · GitHub
[go: up one dir, main page]

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 67fda44

Browse files
committed
PRF: only try to use IPython if already imported
1 parent e2cf264 commit 67fda44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,9 @@ def param(func):
15911591
python_has_signature = major >= 3 and minor1 >= 3
15921592
python_has_wrapped = major >= 3 and minor1 >= 2
15931593

1594-
if not python_has_signature:
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:
15951597
try:
15961598
import IPython.utils.signatures
15971599
signature = IPython.utils.signatures.signature

0 commit comments

Comments
 (0)
0