8000 TST: Cache available interactive backends by QuLogic · Pull Request #27422 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

TST: Cache available interactive backends #27422

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

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

QuLogic
Copy link
Member
@QuLogic QuLogic commented Dec 2, 2023

PR summary

There are currently 7 backends, and this function is called 8 times during test collection. This means that XOpenDisplay would be called 56 times (multiplied by process count if using xdist).

Locally, I'm seeing a deadlock after too many calls to XOpenDisplay during collection. While this is not directly our bug, it seems prudent to cut this down to only the one check per collection process.

I don't think we can cache this globally, as one might want to re-try a GUI figure after starting an X server (e.g., over SSH or similar), without restarting Python/Matplotlib.

PR checklist

There are currently 7 backends, and this function is called 8 times
during test collection. This means that `XOpenDisplay` would be called
56 times (multiplied by process count if using xdist).

Locally, I'm seeing a deadlock after too many calls to `XOpenDisplay`
during collection. While this is not directly our bug, it seems prudent
to cut this down to only the one check per collection process.

I don't think we can cache this globally, as one might want to re-try a
GUI figure after starting an X server (e.g., over SSH or similar),
without restarting Python/Matplotlib.
@QuLogic QuLogic force-pushed the test-cache-display branch from e0afede to 73b2152 Compare December 2, 2023 10:04
@oscargus oscargus merged commit 5b5154d into matplotlib:main Dec 3, 2023
@tacaswell
Copy link
Member

This fixes the collection failure for me as well.

@tacaswell tacaswell added this to the v3.9.0 milestone Dec 4, 2023
@QuLogic QuLogic deleted the test-cache-display branch December 4, 2023 22:53
@QuLogic QuLogic mentioned this pull request Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0