Sphinx is broken on Travis

Bug #1792291 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
High
Unassigned

Bug Description

Travis debug builds are broken due to an error raised by Sphinx:

You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+[[ linux == \o\s\x ]]
+pushd ../doc/sphinx
~/build/widelands/widelands/doc/sphinx ~/build/widelands/widelands/build
+mkdir source/_static
+./extract_rst.py
+sphinx-build -W -b json -d build/doctrees source build/json
Running Sphinx v1.8.0
Exception occurred:
  File "/usr/local/lib/python2.7/dist-packages/sphinx/highlighting.py", line 26, in <module>
    from sphinx.ext import doctest
SyntaxError: unqualified exec is not allowed in function 'run' it contains a nested function with free variables (doctest.py, line 97)
The full traceback has been saved in /tmp/sphinx-err-7CDxea.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
The command "bash -e .travis.sh" exited with 2.
Done. Your build exited with 1.

I tried reproducing the issue, but I am unable to get the corresponding version of sphinx to run:

widelands/fix-sphinx/doc/sphinx$ pip3 list
<snip>
snowballstemmer (1.2.1)
Sphinx (1.8.0)
sphinxcontrib-websupport (1.1.0)
<snip>
widelands/fix-sphinx/doc/sphinx$ make html
sphinx-build -b html -d build/doctrees source build/html
Running Sphinx v1.7.4
loading pickled environment... done

So, I have just upgraded to Sphinx 1.8.0 but it's running Sphinx v1.7.4 anyway...

I'll remove the sphinx build from Travis until we can figure this out.

Tags: buildsystem

Related branches

Revision history for this message
kaputtnik (franku) wrote :

See: https://github.com/sphinx-doc/sphinx/issues/5417

But after upgrading sphinx to version 1.8.0 in my website environment it works for me:

$:> ~/wlwebsite/bin/sphinx-build -W -b json -d build/doctrees source build/json
Sphinx v1.8.0 in Verwendung
building [mo]: targets for 0 po files that are out of date
building [json]: targets for 79 source files that are out of date
updating environment: 79 added, 0 changed, 0 removed
reading sources... [100%] wlrichtext
looking for now-outdated files... none found
pickling environment... erledigt
checking consistency...
Warning, treated as error:
/home/kaputtnik/Quellcode/widelands-repo/trunk/doc/sphinx/source/autogen_market_lua_tribes_buildings_init.rst:document isn't included in any toctree

The -W flag of sphinx-build turns warnings into errors, so when omitting the -W flag i get all json files:

$:> ~/wlwebsite/bin/sphinx-build -b json -d build/doctrees source build/json
Sphinx v1.8.0 in Verwendung
building [mo]: targets for 0 po files that are out of date
building [json]: targets for 79 source files that are out of date
updating environment: 79 added, 0 changed, 0 removed
reading sources... [100%] wlrichtext
looking for now-outdated files... none found
pickling environment... erledigt
checking consistency... /home/kaputtnik/Quellcode/widelands-repo/trunk/doc/sphinx/source/autogen_market_lua_tribes_buildings_init.rst: WARNING: document isn't included in any toctree
erledigt
preparing documents... erledigt
writing output... [100%] wlrichtext
generating indices... genindex py-modindex
writing additional pages... search
copying images... [100%] images/geometry/point-in-one-of-4-triangles.png
copying static files... done
copying extra files... erledigt
dumping search index in English (code: en) ... erledigt
dumping object inventory... erledigt
build abgeschlossen, 1 warning.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks! I'll watch the GitHub issue.

GunChleoc (gunchleoc)
Changed in widelands:
importance: Critical → High
status: New → Confirmed
Revision history for this message
kaputtnik (franku) wrote :

Easier solution: https://github.com/ystia/yorc-a4c-plugin/commit/91ac4bb6db05de3d3e74f9661b7117c25714b75a

The bug in sphinx will be fixed in version 1.8.1

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.