Skip to content

sphinxext: Do not copy plot_directive.css's metadata #23805

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
Sep 6, 2022

Conversation

collares
Copy link
Contributor

@collares collares commented Sep 5, 2022

PR Summary

The Sphinx extension uses shutil.copy to put plot_directive.css in the _static directory. In Nix, this copies from the read-only Nix store, which results in a read-only plot_directive.css file. This causes some problem with SageMath docbuilding, because it deduplicates _static directories with symlinks, resulting in failed overwrite attempts. See NixOS/nixpkgs#189776 for a more detailed description.

PR Checklist

Tests and Styling

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@oscargus oscargus added this to the v3.6.0 milestone Sep 5, 2022
@tacaswell tacaswell merged commit 4ad86c8 into matplotlib:main Sep 6, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 6, 2022
@tacaswell
Copy link
Member

Thank you @collares and congratulations on your first merged Matplotlib PR 🎉

Hopefully we will hear from you again!

@tacaswell
Copy link
Member

I see now downside to this. shutil.copy is copyfile followed by copymode with both preceded by "is this a directory or a path?" (https://github.com/python/cpython/blob/222f10ca2d01c86fa2c53c2edd6884f117324297/Lib/shutil.py#L418-L422) so doing less work seems like a win in any context.

timhoffm added a commit that referenced this pull request Sep 6, 2022
…805-on-v3.6.x

Backport PR #23805 on branch v3.6.x (sphinxext: Do not copy plot_directive.css's metadata)
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