Skip to content

monkeypatch _mathtext.Parser.parse() with a threading.Lock() - #598

Open
nvaytet wants to merge 3 commits into
mainfrom
monkeypatch-math-parser
Open

monkeypatch _mathtext.Parser.parse() with a threading.Lock()#598
nvaytet wants to merge 3 commits into
mainfrom
monkeypatch-math-parser

Conversation

@nvaytet

@nvaytet nvaytet commented Jul 31, 2026

Copy link
Copy Markdown
Member

Copied from matplotlib/ipympl#621

I don't know if this is the right place to put it, with the lazy_loader and everything. We may not want to do that work as soon as we import plopp?

I think we could potentially move it into the backends/matplotlib/__init__.py because the other places where matplotlib is used (e.g. making the colorbar for 3d scatter plots) don't make use of ipympl.

Either choice would lead to a somewhat possibly surprising behaviour for other plain MPL figures:

  • if we keep it in top-level init, after importing plopp, it would fix other custom mpl figures
  • in the backends/matplotlib/init, it would fix other figures after we have made a 1d or 2d figure with plopp

@nvaytet
nvaytet requested a review from SimonHeybrock July 31, 2026 10:23
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

Successfully merging this pull request may close these issues.

1 participant