jupyter / qtconsole

Jupyter Qt Console
https://qtconsole.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
408 stars 199 forks source link

Stop using `IPythonLexer` from ` IPython.lib.lexers` #588

Closed Czaki closed 1 week ago

Czaki commented 10 months ago

In release 8.17.0 the ipython remove IPythonLexer from IPython.lib.lexers as cleanup of python 2 code. However qtconsole still import its:

https://github.com/jupyter/qtconsole/blob/2accd52e7af226bc857a89099260e55c5740efe1/qtconsole/jupyter_widget.py#L17

That leads to crash on import time.

I have opened issue in python repository: https://github.com/ipython/ipython/issues/14227

But long term solution should be to not depend on IPythonLexer, especially that project ins python 3.7+.

Carreau commented 10 months ago

I've yanked the release and will revert, but IPythonLexer is for Python 2 so there is no reason to Import it the package does not support Python 2.

ccordoba12 commented 10 months ago

Leaving this for the next minor version of QtConsole (5.6.0), which will go along with Spyder 6, to be released at the beginning of next year. That's because Spyder 5 still supports Python 2 kernels and some users let us know that they rely on that functionality.

Carreau commented 10 months ago

No problem, i can delay removing from IPython as well.