-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Spin docs gives errors (distutils) on new codespaces (because python 3.12 in environment.yml) #29131
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
Comments
It seems reasonable to pin to the lowest supported numpy version, want to make a PR? I wonder why it was pinned to 3.12? |
The change was made in 8a890f1, but not sure what issues where happening with builds. Any thoughts @rgommers on moving it back to 3.11 for the time being at least till after SciPy? I haven't experienced any issues on codespaces, ubuntu 24, nor a virtual machinie of ubuntu on windows after changing it to 3.11, but I haven't tested macos (which seems connected to the commit above). I can submit a PR to revert the change in |
Indeed. Following back the trail from that commit, it leads to these comments about a flaky test and having to move to 3.12 to resolve them: #27550 (comment) This problem isn't specific to WDYT? |
Sounds like a fun project to work on. Do you have an example of a reference that needs to be removed and one that needs to be gated behind a directive? I have time to go through and update all of them. |
I think you'd have to figure that out by repeatedly building the docs in a Python 3.12 or 3.13 environment and adding the |
Here is a progress update. The main problem is the following: numpy/doc/source/reference/distutils/misc_util.rst Lines 4 to 7 in 031f442
Once this automodule section is removed, then
Here are the corresponding lines of code that generate these warnings. numpy/doc/source/reference/index.rst Line 43 in 031f442
Warnings 1,2, and 4 above can all be dealt with by removing the corresponding reference/label. I'm still working on how to remove warning 3 above in a way that allows the build to work with both python 3.11 and >=3.12. |
Looks like adding |
A cleaner way of excluding this orphaned file is to update Lines 153 to 154 in 75fd1ff
to
This solves the import warning errors and keeps the exclusions in the same place for simple removal later. Updating the toctree is more complicated. The After searching for solutions, this is apparently a known issue that some of you have encountered before (see #16372 (comment)). Anyone have any experience with using Right now I'm playing around with I'm going to submit a draft PR and we can move the conversation over there. |
Enables an error free build of the docs for python 3.12+. Excludes related files, supresses all warnings for excluded files, and ignores case-by-case individual references. Closes numpy#29131. [skip azp][skip cirrus][skip actions]
Thanks for working through the options for avoiding the warnings @bmwoodruff! |
Issue with current documentation:
With SciPy 2025 coming up, and the possibility of having new people join for sprints, i figured it would be worth pointing out a possible hiccup.
environment.yml
), the commandspin docs
finishes with error messages. This are the samenumpy.distutils
error message discussed in DOC: docs build warnings #28694.The issue occurs because of the pinned 3.12 python version.
numpy/environment.yml
Line 10 in c6eed9a
Idea or request for content:
The issue disappears by manually changing the python version back to 3.11. These steps should error free build the docs on codespaces.
environment.yml
and push the changes to your branch.conda activate numpy-dev
spin test && pip install -r requirements/doc_requirements.txt && spin docs
My hope is this could help anyone new who wants to help but can't figure out why they keep getting errors. Maybe there is a simpler way to help someone new that doesn't involve changing
environment.yml
.The text was updated successfully, but these errors were encountered: