-
Notifications
You must be signed in to change notification settings - Fork 131
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
Possible bug: misc.copy_overwrite warning #818
Comments
Thanks for reporting this! Which version of There was a regression in Sphinx which wasn't fixed, but instead they added the warning you mentioned (see also sphinx-doc/sphinx#12096 (comment)). If you still get the warning with the latest release, please provide a minimal example how to reproduce this.
UPDATE: I think I was confused about this, see my comment #818 (comment) below. |
I'm still seeing this with nbsphinx version 0.9.5. (I checked the version by adding a I'll work on a minimal example. |
After reading your original description again, I realized that I completely missed that this is not about CSS/JS (which has a work-around in #808), but about copying I guess this problem does not happen when building from scratch, but only when a previous build is present in the build directory? |
The notebook files are copied here: nbsphinx/src/nbsphinx/__init__.py Lines 1707 to 1713 in 1fda481
I think we could add @gabalafou Would you like to make a PR? |
Sure, I'll give it a try :) |
Just for the record, I created a minimal repro gist for this bug |
To reproduce the bug, after you set up your sphinx folder following the minimal repro gist, then you |
Sphinx 8 introduced a change to not overwrite user-supplied data by default when copying. It changed two utility functions,
copyfile
andcopy_asset_file
. They now skip any files that would result in a file overwrite and emit a "misc.copy_overwrite" warning unless called withforce=True
.Nbsphinx calls
sphinx.util.copyfile
directly and it callscopy_asset_file
indirectly viasphinx.util.fileutil.copy_asset
, but it does not passforce=True
.I am not familiar enough with Sphinx or nbsphinx to know if force=True should be passed. All I know is this issue surfaced as a bug in my own development workflow. I was working on the PyData Sphinx Theme repo, which aborts its docs build if it encounters a warning that it does not expect.
Here is the full warning:
The reason why I suspect that this might be a bug in nbsphinx is that the PyData Theme docs use a number of other extensions and none of them trigger this warning; it's only nbsphinx.
The text was updated successfully, but these errors were encountered: