Skip to content

CI's Tests / Docs / Doctest (pull_request) throws an exception #125745

Description

@rruuaanng

Bug report

Bug description:

I'm not sure if this is caused by my PR. But it seems to be caused by the CI service running

Run xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
  xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
  shell: /usr/bin/bash -e {0}
  env:
    FORCE_COLOR: 1
make: Entering directory '/home/runner/work/cpython/cpython/Doc'
make[1]: Entering directory '/home/runner/work/cpython/cpython/Doc'
mkdir -p build

Missing the required blurb or sphinx-build tools.
Please run 'make venv' to install local copies.

make[1]: *** [Makefile:55: build] Error 1
make[1]: Leaving directory '/home/runner/work/cpython/cpython/Doc'
Testing of doctests in the sources finished, look at the results in build/doctest/output.txt
make: *** [Makefile:134: doctest] Error 1
make: Leaving directory '/home/runner/work/cpython/cpython/Doc'

from:
https://github.com/python/cpython/actions/runs/11423310997/job/31782368635?pr=125719
https://github.com/python/cpython/actions/runs/11424088507/job/31784009966?pr=125750
https://github.com/python/cpython/actions/runs/11423945175/job/31783706551?pr=125748
https://github.com/python/cpython/actions/runs/11424088507/job/31784009966?pr=125750
https://github.com/python/cpython/actions/runs/11425133485/job/31786988131?pr=125752

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Activity

  1. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    I encountered the same problem, and I noticed that others PR cannot pass the check as well.
    I switch the runner image of doctest to ubuntu-24.04, and get the pass result.
    I guess maybe there is some version misalign.

  2. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    BTW, please pull and rebase before testing.

  3. rruuaanng commented on Oct 20, 2024

    @rruuaanng
    ContributorAuthor

    How should I implement it specifically? Have you solved the problem?

  4. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    I tested it on my branch here, but the result is difference between my branch and my PR check.

  5. rruuaanng commented on Oct 20, 2024

    @rruuaanng
    ContributorAuthor

    But this is just your branch. It seems that we cannot modify the CI server of the main branch.

  6. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    Yes you are right, so I abort all modification and use original CI yml file to test again, and the result is pass(attached in my last comment).

  7. rruuaanng commented on Oct 20, 2024

    @rruuaanng
    ContributorAuthor

    So what should I do in this situation? You should go to those links to review.

  8. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    Yes I have the same problem as you, and the error message from log are all identical with me, so I create another branch on my repo and run all test as same with PR.
    Maybe you can run all test on your another test branch to check result.

  9. rruuaanng commented on Oct 20, 2024

    @rruuaanng
    ContributorAuthor

    I mean, how can I eliminate this error and get it to pass CI? If you find a solution, you should review it in my list above.

  10. hugovk commented on Oct 20, 2024

    @hugovk
    Member

    For some reason it can't find blurb when running blurb help, even though the previous step had created a venv: The venv has been created in the ./venv directory.

    The last passing build is: https://github.com/python/cpython/actions/runs/11422034235/job/31779554757?pr=125739

    The first failing build is: https://github.com/python/cpython/actions/runs/11422219191/job/31779951386?pr=125571

  11. rruuaanng commented on Oct 20, 2024

    @rruuaanng
    ContributorAuthor

    What should we do about this problem? From the list I made, it seems that I'm not the only one who has this problem :-(

  12. hugovk commented on Oct 20, 2024

    @hugovk
    Member

    We should figure out the cause and fix it :)

    I've confirmed it's not caused by yesterday's release of blurb 1.3.0 (https://github.com/python/blurb/releases/tag/v1.3.0) and also not by yesterday's bump of the min Sphinx version to 7.2.6 (2bb7ab7).

  13. hugovk commented on Oct 20, 2024

    @hugovk
    Member

    Editing this locally:

    diff --git a/Doc/Makefile b/Doc/Makefile
    index a090ee5ba92..5ad04120b9f 100644
    --- a/Doc/Makefile
    +++ b/Doc/Makefile
    @@ -55,6 +55,7 @@ build:
     # Look first for a Misc/NEWS file (building from a source release tarball
     # or old repo) and use that, otherwise look for a Misc/NEWS.d directory
     # (building from a newer repo) and use blurb to generate the NEWS file.
    +	$(BLURB) help
     	@if [ -f  ../Misc/NEWS ] ; then \
     		echo "Using existing Misc/NEWS file"; \
     		cp ../Misc/NEWS build/NEWS; \

    And running:

    ❯ make -C Doc/ PYTHON=../python.exe clean venv
    rm -rf ./venv
    rm -rf build/*
    Creating venv in ./venv
    Requirement already satisfied: pip in ./venv/lib/python3.14/site-packages (24.2)
    Collecting sphinx~=8.1.0 (from -r requirements.txt (line 9))
      Using cached sphinx-8.1.3-py3-none-any.whl.metadata (6.4 kB)
    Collecting blurb (from -r requirements.txt (line 11))
      Using cached blurb-1.3.0-py3-none-any.whl.metadata (9.0 kB)
    Collecting sphinxext-opengraph~=0.9.0 (from -r requirements.txt (line 13))
      Using cached sphinxext_opengraph-0.9.1-py3-none-any.whl.metadata (6.5 kB)
    Collecting sphinx-notfound-page~=1.0.0 (from -r requirements.txt (line 14))
      Using cached sphinx_notfound_page-1.0.4-py3-none-any.whl.metadata (2.9 kB)
    Collecting python-docs-theme!=2023.7,>=2023.3.1 (from -r requirements.txt (line 18))
      Using cached python_docs_theme-2024.6-py3-none-any.whl.metadata (2.3 kB)
    Collecting sphinxcontrib-applehelp>=1.0.7 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_applehelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
    Collecting sphinxcontrib-devhelp>=1.0.6 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_devhelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
    Collecting sphinxcontrib-htmlhelp>=2.0.6 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl.metadata (2.3 kB)
    Collecting sphinxcontrib-jsmath>=1.0.1 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl.metadata (1.4 kB)
    Collecting sphinxcontrib-qthelp>=1.0.6 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_qthelp-2.0.0-py3-none-any.whl.metadata (2.3 kB)
    Collecting sphinxcontrib-serializinghtml>=1.1.9 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl.metadata (2.4 kB)
    Collecting Jinja2>=3.1 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
    Collecting Pygments>=2.17 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached pygments-2.18.0-py3-none-any.whl.metadata (2.5 kB)
    Collecting docutils<0.22,>=0.20 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached docutils-0.21.2-py3-none-any.whl.metadata (2.8 kB)
    Collecting snowballstemmer>=2.2 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached snowballstemmer-2.2.0-py2.py3-none-any.whl.metadata (6.5 kB)
    Collecting babel>=2.13 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached babel-2.16.0-py3-none-any.whl.metadata (1.5 kB)
    Collecting alabaster>=0.7.14 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached alabaster-1.0.0-py3-none-any.whl.metadata (2.8 kB)
    Collecting imagesize>=1.3 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached imagesize-1.4.1-py2.py3-none-any.whl.metadata (1.5 kB)
    Collecting requests>=2.30.0 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
    Collecting packaging>=23.0 (from sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
    Collecting MarkupSafe>=2.0 (from Jinja2>=3.1->sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached MarkupSafe-2.1.5-cp314-cp314d-macosx_14_0_arm64.whl
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    Collecting charset-normalizer<4,>=2 (from requests>=2.30.0->sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached charset_normalizer-3.4.0-py3-none-any.whl.metadata (34 kB)
    Collecting idna<4,>=2.5 (from requests>=2.30.0->sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
    Collecting urllib3<3,>=1.21.1 (from requests>=2.30.0->sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
    Collecting certifi>=2017.4.17 (from requests>=2.30.0->sphinx~=8.1.0->-r requirements.txt (line 9))
      Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
    Using cached sphinx-8.1.3-py3-none-any.whl (3.5 MB)
    Using cached blurb-1.3.0-py3-none-any.whl (19 kB)
    Using cached sphinxext_opengraph-0.9.1-py3-none-any.whl (1.0 MB)
    Using cached sphinx_notfound_page-1.0.4-py3-none-any.whl (8.2 kB)
    Using cached python_docs_theme-2024.6-py3-none-any.whl (19 kB)
    Using cached alabaster-1.0.0-py3-none-any.whl (13 kB)
    Using cached babel-2.16.0-py3-none-any.whl (9.6 MB)
    Using cached docutils-0.21.2-py3-none-any.whl (587 kB)
    Using cached imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
    Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
    Using cached packaging-24.1-py3-none-any.whl (53 kB)
    Using cached pygments-2.18.0-py3-none-any.whl (1.2 MB)
    Using cached requests-2.32.3-py3-none-any.whl (64 kB)
    Using cached snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
    Using cached sphinxcontrib_applehelp-2.0.0-py3-none-any.whl (119 kB)
    Using cached sphinxcontrib_devhelp-2.0.0-py3-none-any.whl (82 kB)
    Using cached sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl (98 kB)
    Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
    Using cached sphinxcontrib_qthelp-2.0.0-py3-none-any.whl (88 kB)
    Using cached sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl (92 kB)
    Using cached certifi-2024.8.30-py3-none-any.whl (167 kB)
    Using cached charset_normalizer-3.4.0-py3-none-any.whl (49 kB)
    Using cached idna-3.10-py3-none-any.whl (70 kB)
    Using cached urllib3-2.2.3-py3-none-any.whl (126 kB)
    Installing collected packages: snowballstemmer, urllib3, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, python-docs-theme, Pygments, packaging, MarkupSafe, imagesize, idna, docutils, charset-normalizer, certifi, blurb, babel, alabaster, requests, Jinja2, sphinx, sphinxext-opengraph, sphinx-notfound-page
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    /Users/hugo/github/python/cpython/main/Doc/venv/lib/python3.14/site-packages/pip/_internal/metadata/importlib/_dists.py:77: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
      return cls(files, info_location)
    Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.5 Pygments-2.18.0 alabaster-1.0.0 babel-2.16.0 blurb-1.3.0 certifi-2024.8.30 charset-normalizer-3.4.0 docutils-0.21.2 idna-3.10 imagesize-1.4.1 packaging-24.1 python-docs-theme-2024.6 requests-2.32.3 snowballstemmer-2.2.0 sphinx-8.1.3 sphinx-notfound-page-1.0.4 sphinxcontrib-applehelp-2.0.0 sphinxcontrib-devhelp-2.0.0 sphinxcontrib-htmlhelp-2.1.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-2.0.0 sphinxcontrib-serializinghtml-2.0.0 sphinxext-opengraph-0.9.1 urllib3-2.2.3
    The venv has been created in the ./venv directory

    And then:

    ❯ make -C Doc/ PYTHON=../python.exe SPHINXERRORHANDLING="-W --keep-going" doctest
    mkdir -p build
    PATH=./venv/bin:$PATH blurb help
    /bin/sh: ./venv/bin/blurb: /Users/hugo/github/python/cpython/main/Doc/venv/bin/python@EXE_SUFFIX@: bad interpreter: No such file or directory
    make[1]: *** [build] Error 126
    Testing of doctests in the sources finished, look at the results in build/doctest/output.txt
    make: *** [doctest] Error 1

    That EXE_SUFFIX was a change added in e924bb6 / #125699.

    Reverting this commit fixes the doctest locally and on CI:

    cc @erlend-aasland

  14. Damien-Chen commented on Oct 20, 2024

    @Damien-Chen
    Contributor

    Should that change need to be merge to main branch ?

  15. erlend-aasland commented on Oct 20, 2024

    @erlend-aasland
    Contributor

    @hugovk, is EXEEXT used by blurb?

  16. hugovk commented on Oct 20, 2024

    @hugovk
    Member
  17. erlend-aasland commented on Oct 20, 2024

    @erlend-aasland
    Contributor

    Hugo:

    That EXE_SUFFIX was a change added in e924bb6 / #125699.

    Reverting this commit fixes the doctest locally and on CI:

    Let's do the revert; I can land it. We've tried to rename configure/Make variables before, and it's always trickier than you'd expect. I've got a better idea of how to solve gh-125698.

  18. erlend-aasland commented on Oct 20, 2024

    @erlend-aasland
    Contributor

    @hugovk, it could be a caching thing. Are we caching the docs venv in CI? If so, that could explain the breakage. Is there a way to invalidate the CI cache?

  19. AA-Turner commented on Oct 20, 2024

    @AA-Turner
    Member

    We cache pip's cache:

    https://github.com/python/cpython/blob/main/.github/workflows/reusable-docs.yml#L102-L107

    It seems you can use gh actions-cache to delete the cache, or just change requirements.txt so that the cache key changes.

    A

  20. erlend-aasland commented on Oct 20, 2024

    @erlend-aasland
    Contributor

    I reverted the EXEEXT rename. Closing this as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions