Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting no longer working with ipython==8.7.0 #687

Closed
nvaytet opened this issue Dec 5, 2022 · 6 comments
Closed

Syntax highlighting no longer working with ipython==8.7.0 #687

nvaytet opened this issue Dec 5, 2022 · 6 comments

Comments

@nvaytet
Copy link

nvaytet commented Dec 5, 2022

I do not know if the issue lies with nbsphinx or nbconvert, but after upgrading from ipython==8.5.0 to ipython==8.7.0, the syntax highlighting in our sphinx docs is gone.
Only black text in the code blocks.

Before:
Screenshot at 2022-12-05 10-48-18

After:
Screenshot at 2022-12-05 10-51-21

@maparent
Copy link

maparent commented Dec 6, 2022

I can confirm that the pygments.lexers entry is no longer added to entry_points.txt.
It is because of the explicit

setup_args["entry_points"] = {"console_scripts": find_entry_points()}

at line 142 of setup.py, which should also include the pygments.lexers entry present in setup.cfg

@mgeier
Copy link
Member

mgeier commented Dec 6, 2022

Thanks @nvaytet for reporting this and @maparent for finding the root cause for the problem.

It looks like the IPython folks are already working on fixing this: ipython/ipython#13845, ipython/ipython#13848.

In the meantime, a possible work-around should be to disallow the broken IPython version:

ipython!=8.7.0

@al-jshen
Copy link

al-jshen commented Dec 9, 2022

Had the same issue here. The old workaround of adding "IPython.sphinxext.ipython_console_highlighting" to "extensions" in conf.py from #24 seems to fix the problem for me.

sebp added a commit to sebp/scikit-survival that referenced this issue Dec 18, 2022
sebp added a commit to sebp/scikit-survival that referenced this issue Dec 18, 2022
fernandezfran added a commit to fernandezfran/aelm that referenced this issue Dec 19, 2022
fernandezfran added a commit to fernandezfran/sierras that referenced this issue Dec 19, 2022
fernandezfran added a commit to fernandezfran/galpynostatic that referenced this issue Dec 19, 2022
@mgeier
Copy link
Member

mgeier commented Dec 21, 2022

A little update: ipython/ipython#13848 has been merged, now we are only waiting for a new release.

@Zethson
Copy link

Zethson commented Jan 4, 2023

8.8.0 just got released yesterday

@mgeier
Copy link
Member

mgeier commented Jan 17, 2023

Thanks @Zethson, I can confirm that syntax highlighting works again with IPython 8.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants