You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doctest GitHub Actions job exits with 2 failing all recent PRs #101639
Error: numpy/random/_mt19937.c:8320:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’
8320 | const digit* digits = ((PyLongObject*)x)->ob_digit;
| ^~
It looks like gh-101292 is the cause. We need to provide some sort of compatibility shim or a deprecation period until numpy introduces version-specific #if guards.
changed the title [-]`doctest` GitHub Actions job exits with `2` marking checks of all recent PRs[/-][+]`doctest` GitHub Actions job exits with `2` failing all recent PRs[/+]on Feb 7, 2023
I think the fundamental problem here is that the doc build/test process uses the newly built Python and third-party dependencies from PyPI. I don't think it's bad to test that certain things work in the new Python, but expecting installable packages for the target Python is a bit problematic for two reasons: the Python we're building may be too new for the packages (as in this case), or the Python may be too old (for example when building docs for an older Python that the dependencies have already stopped supporting).
One of the Sphinx extensions we're using just released (in 0.8.0) support for generating images via Matplotlib, which depends on NumPy: sphinx-doc/sphinxext-opengraph#88
Even though we're not using the image generation there (yet, we may do later), it still attempts the install and import.
The quick fix is to pin sphinxext-opengraph to 0.5.9.
Alternatively, for the benefit of downstream redistributors, we did take care that if the extension isn't installed, it won't be used:
Activity
[-]`doctest` GitHub Actions job exits with `2` marking checks of all recent PRs[/-][+]`doctest` GitHub Actions job exits with `2` failing all recent PRs[/+]Yhg1s commentedon Feb 7, 2023
I think the fundamental problem here is that the doc build/test process uses the newly built Python and third-party dependencies from PyPI. I don't think it's bad to test that certain things work in the new Python, but expecting installable packages for the target Python is a bit problematic for two reasons: the Python we're building may be too new for the packages (as in this case), or the Python may be too old (for example when building docs for an older Python that the dependencies have already stopped supporting).
hugovk commentedon Feb 7, 2023
One of the Sphinx extensions we're using just released (in 0.8.0) support for generating images via Matplotlib, which depends on NumPy: sphinx-doc/sphinxext-opengraph#88
Even though we're not using the image generation there (yet, we may do later), it still attempts the install and import.
The quick fix is to pin sphinxext-opengraph to 0.5.9.
Alternatively, for the benefit of downstream redistributors, we did take care that if the extension isn't installed, it won't be used:
cpython/Doc/conf.py
Lines 27 to 33 in 7990324
For doctest, we could also make use of this and only install the key essentials for the test.
arhadthedev commentedon Feb 7, 2023
Fixed by gh-101642.