Spyder: DeprecationWarning with iPython during executing certain commands in the console.

Created on 19 Oct 2018  路  8Comments  路  Source: spyder-ide/spyder

PS0: Downgrading ipython to 6.5.0 solves this.

Problem Description

A "DeprecationWarning" is triggered when executing certain commands in the console,like "import a as b",but not occurs everytime as described in the senario below.

Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.0.1 -- An enhanced Interactive Python.

import nilmtk

import nilmtk as nt
d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:444: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

import keras as k
d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:444: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)
Using TensorFlow backend.

Moreover, sometimes I need to hit the Enter key twice more to execute a certain command even that command is intact, with which the DeprecationWarning appears possibly.


d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:448: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

import numpy

d:\anaconda3\lib\site-packages\ipykernel\ipkernel.py:448: DeprecationWarning: `input_splitter` is deprecated since IPython 7.0, prefer `input_transformer_manager`.
  status, indent_spaces = self.shell.input_splitter.check_complete(code)

PS: The first deprecation warning above "import numpy" appears when the command is executed but appears ahead of the command line.

PS1: Have tried in QtConsole just now, it happens too sometimes.

Versions

  • Spyder version: 3.3.1
  • Python version: 3.6.6
  • Qt version: 5.9.6
  • PyQt version: 5.9.2
  • Operating System name/version: Windows Server 2016 1607

Dependencies

IPython >=4.0 : 7.0.1 (OK)
cython >=0.21 : 0.29 (OK)
jedi >=0.9.0 : 0.13.1 (OK)
matplotlib >=2.0.0: 3.0.0 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
numpy >=1.7 : 1.15.2 (OK)
pandas >=0.13.1 : 0.23.4 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pyflakes >=0.6.0 : 2.0.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 2.1.1 (OK)
qtconsole >=4.2.0 : 4.4.1 (OK)
rope >=0.9.4 : 0.11.0 (OK)
sphinx >=0.6.6 : 1.8.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)

Thank you.

IPython Console Bug

Most helpful comment

Same problem here on a Macbook with Spyder4 and IPython 7.5.0. Perhaps the issue should be reopend?

All 8 comments

Thanks for reporting. We'll fix this in our next release.

In the meantime you can downgrade to IPython 6 to avoid this.

Just to let you know this also happened with my spyder version 3.3.2, but have downgraded to IPython 6 as mentioned and is fine.

Still present in Spyder 3.3.3.

i have same issue now in IPython 7.2.0

This happens constantly in IPython 9 and Spyder 4. It is impossible to submit commands through the console??

I don't start getting these warnings until warnings.simplefilter('always') has been executed somewhere. A temporary fix is to simply run warnings.filters.pop(0). See my full comment here for more details.

Same problem here on a Macbook with Spyder4 and IPython 7.5.0. Perhaps the issue should be reopend?

Was this page helpful?
0 / 5 - 0 ratings