Skip to content

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

Merged
ianthomas23 merged 1 commit into
matplotlib:mainfrom
MridulS:tight_layout
Jul 31, 2026
Merged

monkeypatch _mathtext.Parser.parse() with a threading.Lock()#621
ianthomas23 merged 1 commit into
matplotlib:mainfrom
MridulS:tight_layout

Conversation

@MridulS

@MridulS MridulS commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

This is to prevent concurrent corruption of the parser singleton's mutable state.

I'm not a 100% sure if there would be any side effects here or if ipympl is the right place for the fix, but this does fix #610 in local testing.

This is to prevent concurrent corruption of the parser
singleton's mutable state.
@github-actions

Copy link
Copy Markdown
Contributor

Binder 👈 Launch a binder notebook on branch MridulS/ipympl/tight_layout

@nvaytet

nvaytet commented Jul 31, 2026

Copy link
Copy Markdown

It would be very nice to get the linked issue fixed. Can we make progress here? 🙏

@ianthomas23 ianthomas23 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MridulS, looks good to me.

@ianthomas23
ianthomas23 merged commit 109111b into matplotlib:main Jul 31, 2026
1 check passed
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.

Error with ipykernel>=7 in combination with plt.tight_layout

3 participants