https://pypi.python.org/pypi/Sphinx 1.4 was released on 2016-03-28 Changelog: https://github.com/sphinx-doc/sphinx/blob/master/CHANGES
And 1.4.1 has been released 2016-04-12.
I tried this bump, but see a bunch of test failures: ====================================================================== ERROR: Failure: SyntaxError (invalid syntax (test_autodoc_py35.py, line 281)) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/test_autodoc_py35.py", line 281 async def _other_coro_func(): ^ SyntaxError: invalid syntax ====================================================================== ERROR: Failure: ParseError (mismatched tag: line 91, column 4) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/loader.py", line 251, in generate for test in g(): File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/util.py", line 278, in deco for item in func(app, status, warning, *args2, **kwargs2): File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/test_build_html.py", line 981, in test_enumerable_node etree = ET.parse(fp, parser) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/etree13/ElementTree.py", line 1125, in parse tree.parse(source, parser) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/etree13/ElementTree.py", line 654, in parse parser.feed(data) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/etree13/ElementTree.py", line 1535, in feed self._raiseerror(v) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/etree13/ElementTree.py", line 1433, in _raiseerror raise err ParseError: mismatched tag: line 91, column 4 ====================================================================== ERROR: Failure: SyntaxError (invalid syntax (typing_test_data.py, line 6)) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/typing_test_data.py", line 6 def f0(x: int, y: Integral) -> None: ^ SyntaxError: invalid syntax ====================================================================== FAIL: test_ext_graphviz.test_graphviz_latex ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/util.py", line 258, in deco func(app, status, warning, *args2, **kwargs2) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/test_ext_graphviz.py", line 37, in decorator return fn(app, *args, **kwargs) File "/var/tmp/portage/dev-python/sphinx-1.4.1/work/Sphinx-1.4.1-python2_7/tests/test_ext_graphviz.py", line 68, in test_graphviz_latex assert re.search(macro, content, re.S) AssertionError ====================================================================== Ebuild diff: djc@enrai sphinx $ diff -u sphinx-1.{3.5,4.1}.ebuild --- sphinx-1.3.5.ebuild 2016-01-27 11:47:27.000000000 +0100 +++ sphinx-1.4.1.ebuild 2016-04-23 10:59:23.000000000 +0200 @@ -30,8 +30,8 @@ >=dev-python/Babel-1.3[${PYTHON_USEDEP}] !=dev-python/Babel-2.0[${PYTHON_USEDEP}] >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}] - >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}] - <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/imagesize[${PYTHON_USEDEP}] latex? ( dev-texlive/texlive-latexextra app-text/dvipng (dev-python/imagesize is now in the tree.)
I only get the the failures with test_autodoc_py35.py (for obvious reason this one should only be tested with python 3.5+) and typing_test_data.py - I think this bit is testing python3 syntax so fails with python2.7. Not sure about the other two. I am guessing having graphviz[python] installed helps with one of them but I have no idea for the other.
Discovered once I thought that I got tests passing on python2.7 that python3.4 needed dev-python/typing to complete its tests. After install a whole bunch of new tests failed with python2.7.... It is long enough that I cannot paste it here. But it appears that it is related to co_kwonlyargcount which may only be available in python3+ so I will have to remove those tests for python 2.7 next.
My diff for now: --- sphinx-1.3.5.ebuild 2016-04-27 10:29:33.890352576 +1200 +++ sphinx-1.4.1.ebuild 2016-04-27 13:53:25.243864125 +1200 @@ -30,8 +30,8 @@ >=dev-python/Babel-1.3[${PYTHON_USEDEP}] !=dev-python/Babel-2.0[${PYTHON_USEDEP}] >=dev-python/snowballstemmer-1.1[${PYTHON_USEDEP}] - >=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}] - <dev-python/sphinx_rtd_theme-2.0[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/imagesize[${PYTHON_USEDEP}] latex? ( dev-texlive/texlive-latexextra app-text/dvipng @@ -41,6 +41,7 @@ test? ( dev-python/nose[${PYTHON_USEDEP}] $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 pypy) + dev-python/typing )" S="${WORKDIR}/${MY_P}" @@ -68,7 +69,22 @@ cp -r -l tests "${BUILD_DIR}"/ || die if $(python_is_python3); then + if ! [[ ${1:-${EPYTHON}} == python3.5 ]] ; then + # python 3.5+ only test + rm -f "${BUILD_DIR}"/tests/test_autodoc_py35.py + fi 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die + else + # tests that require python3+ + pushd "${BUILD_DIR}"/tests + rm -f typing_test_data.py \ + test_autodoc_py35.py \ + test_autodoc.py \ + test_build_html.py \ + test_build_latex.py \ + test_build_texinfo.py \ + test_ext_autosummary.py \ + test_ext_coverage.py + popd fi nosetests -w "${BUILD_DIR}"/tests -v \
Should have put nice python dependencies in `typing`. Also because `typing` is only keyworded "amd64" most other keywords will have to be dropped from sphinx or all the new dependencies will have to be checked for keywords.
Now to 1.4.2. I have an ebuild in the sage-on-gentoo overlay for people interested in testing. Fixes two issues I had with 1.4.1 when I was using it. The tests currently fails hard with python 3.4 for some unicode reason. RefactoringTool: No changes to /scratch2/portage/dev-python/sphinx-1.4.2/work/Sphinx-1.4.2-python3_4/tests/build/日本語/autodoc_fodder.py Traceback (most recent call last): File "/usr/bin/2to3", line 5, in <module> sys.exit(main("lib2to3.fixes")) File "/usr/lib64/python2.7/lib2to3/main.py", line 260, in main options.processes) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 706, in refactor items, write, doctests_only) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 299, in refactor self.refactor_dir(dir_or_file, write, doctests_only) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 319, in refactor_dir self.refactor_file(fullname, write, doctests_only) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 747, in refactor_file *args, **kwargs) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 354, in refactor_file tree = self.refactor_string(input, filename) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 386, in refactor_string self.refactor_tree(tree, name) File "/usr/lib64/python2.7/lib2to3/refactor.py", line 460, in refactor_tree new = fixer.transform(node, results) File "/usr/lib64/python2.7/lib2to3/fixes/fix_import.py", line 70, in transform if self.probably_a_local_import(mod_name): File "/usr/lib64/python2.7/lib2to3/fixes/fix_import.py", line 91, in probably_a_local_import base_path = join(base_path, imp_name) File "/usr/lib64/python2.7/posixpath.py", line 73, in join path += '/' + b UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 82: ordinal not in range(128) I'll get upstream on that case as it looks very much like an upstream issue with the test.
Created attachment 440092 [details] sphinx-1.4.4.ebuild This is an updated ebuild. It does have test failures. I needed >=1.4.3 for the new buildbot I am working on.
Created attachment 440094 [details] build.log This is the build.log from a FEATURES="test" emerge for sphinx-1.4.4
Just to be clear, the updated ebuild is for sphinx-1.4.4
My sphinx 1.4.4 ebuild in the sage-on-gentoo overlay seem to pass its test for python 2.7 and 3.4. I don't have 3.5 yet.
OK you have many more dependencies than me but you are missing `dev-python/typing` for test. Then there is one test that is specifically for a python 3.5 feature and a few that only work with python 3+. I had to filter them: cp -r -l tests "${BUILD_DIR}"/ || die if $(python_is_python3); then if ! [[ ${1:-${EPYTHON}} == python3.5 ]] ; then # python 3.5+ only test rm -f "${BUILD_DIR}"/tests/test_autodoc_py35.py fi 2to3 -w --no-diffs "${BUILD_DIR}"/tests || die else # tests that require python3+ pushd "${BUILD_DIR}"/tests rm -f typing_test_data.py \ test_autodoc_py35.py \ test_autodoc.py \ test_build_html.py \ test_build_latex.py \ test_build_texinfo.py \ test_ext_autosummary.py \ test_ext_coverage.py popd fi nosetests -w "${BUILD_DIR}"/tests -v \ || die "Tests fail with ${EPYTHON}"
This is what they have in setup.py, it does not list typing, but that would make sense as to the failure... I'll test that tomorrow, thank you. setup.py: requires = [ 'six>=1.4', 'Jinja2>=2.3', 'Pygments>=2.0', 'docutils>=0.11', 'snowballstemmer>=1.1', 'babel>=1.3,!=2.0', 'alabaster>=0.7,<0.8', 'imagesize', 'requests', ] extras_require = { # Environment Marker works for wheel 0.24 or later ':sys_platform=="win32"': [ 'colorama>=0.3.5', ], 'websupport': [ 'sqlalchemy>=0.9', 'whoosh>=2.0', ], 'test': [ 'nose', 'mock', # it would be better for 'test:python_version in "2.6,2.7"' 'simplejson', # better: 'test:platform_python_implementation=="PyPy"' 'html5lib', ], }
Well, the content of setup.py is not completely reliable in my experience. I have put >=dev-python/Babel-2.1.1 because version <2.0 give problems. https://github.com/cschwan/sage-on-gentoo/issues/418 I was meaning to open an issue with sphinx about that and I forgot.
OK I found that I the two tests dependencies my ebuild is missing are already installed on my system so I missed them. What is sphinx_rtd_theme for? I don't have it and things are fine.
I've done more testing, found even more deps in their test-reqs.txt file used by travis to install needed deps as well as some in the travis.yml file. Also, it does not make a difference having dev-python/typing installed. So that is not a needed dependency. Also they run their tests using their Makefile. So, I've started testing by re-vamping the python_test phase to use "emake test". It is down to one error, but also it seems to run on the sources directly and so far have only run the tests in py2.7 the theme is a readthedocs theme that the tests seem to require, at least in test-reqs.txt
Is it possible to push out a sphinx-1.4.4 ebuild even with one failing test? That same test that fails via the gentoo ebuild passes in upstreams travis testing. I need to get adding the new buildbot-0.9 to the tree for my upstream work. It's currently located in my buildbot-dev overlay: https://github.com/dol-sen/buildbot-dev/blob/master/dev-python/sphinx/sphinx-1.4.4.ebuild
Are we talking about test_autodoc_py35.py being the failing test?
Other question: how long should we support the work around in case we are replacing an install done with the old python eclass? I believe the last ebuild of sphinx doing that has been removed from the tree on 2014-03-03, do we support upgrading from that far back?
TL:DR: 1.5.1 is out http://www.sphinx-doc.org/en/1.5.1/ and in-tree 1.3.5 starts failing doc generation of docs seen in the wild. Today's example: foo --- .. image:: images/prof_scc.* And two images are present: prof_scc.svg, prof_scc.pdf Crash looks like: Traceback (most recent call last): File "/usr/lib64/python3.4/site-packages/sphinx/cmdline.py", line 245, in main app.build(opts.force_all, filenames) File "/usr/lib64/python3.4/site-packages/sphinx/application.py", line 264, in build self.builder.build_update() File "/usr/lib64/python3.4/site-packages/sphinx/builders/__init__.py", line 245, in build_update 'out of date' % len(to_build)) File "/usr/lib64/python3.4/site-packages/sphinx/builders/__init__.py", line 316, in build self.write(docnames, list(updated_docnames), method) File "/usr/lib64/python3.4/site-packages/sphinx/builders/__init__.py", line 354, in write self._write_serial(sorted(docnames), warnings) File "/usr/lib64/python3.4/site-packages/sphinx/builders/__init__.py", line 362, in _write_serial self.write_doc(docname, doctree) File "/usr/lib64/python3.4/site-packages/sphinx/builders/html.py", line 439, in write_doc self.docwriter.write(doctree, destination) File "/usr/lib64/python3.4/site-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib64/python3.4/site-packages/sphinx/writers/html.py", line 53, in translate self.document.walkabout(visitor) File "/usr/lib64/python3.4/site-packages/docutils/nodes.py", line 187, in walkabout visitor.dispatch_departure(self) File "/usr/lib64/python3.4/site-packages/docutils/nodes.py", line 1895, in dispatch_departure return method(node) File "/usr/lib64/python3.4/site-packages/docutils/writers/_html_base.py", line 671, in depart_document assert not self.context, 'len(context) = %s' % len(self.context) AssertionError: len(context) = 1
Created attachment 459256 [details, diff] fix build for sphinx 1.5.1 Obviously there is a bug in upstream: there is no `sphinx/environment.py` file anymore.
Created attachment 459258 [details, diff] Remove accessing online fonts from the generated docs I'm travelling a lot so prefer to have a really offline docs (with USE=doc) for all packages I need...
Please see https://github.com/gentoo/gentoo/pull/3371 The new 1.5.1 release is already in the works with fixes
(In reply to Alex Turbov from comment #22) > Created attachment 459258 [details, diff] [details, diff] > Remove accessing online fonts from the generated docs > > I'm travelling a lot so prefer to have a really offline docs (with USE=doc) > for all packages I need... I thought about this a bit, and your patch likely won't enter the tree. This is mainly due to the fact that it changes upstream's semantics, which we should avoid as downstream consumers. Fortunately, this is a non-issue, as the ebuild will be EAPI 6 and as such you can rely on eapply_user to apply your patches for you.
Committed with ~alpha, ~amd64 and ~x86. Once the other arches finally catch up with the KEYWORDREQs, we can add them too. commit daa8cfe0a3d9151388a3c8d8694ada2376470092 Author: David Seifert <soap@gentoo.org> Date: Mon Jan 16 18:34:13 2017 +0100 dev-python/sphinx: Version bump to 1.5.1 Gentoo-bug: 579106 * EAPI=6 * Basis for ebuild by Brian Dolbec (dol-sen)
commit daa8cfe0a3d9151388a3c8d8694ada2376470092 Author: David Seifert <soap@gentoo.org> Date: Mon Jan 16 18:34:13 2017 +0100 dev-python/sphinx: Version bump to 1.5.1 Gentoo-bug: 579106 * EAPI=6 * Basis for ebuild by Brian Dolbec (dol-sen) Package-Manager: Portage-2.3.3, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/3371