This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients docs@python, vstinner
Date 2019-04-11.02:49:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554950965.55.0.0913094506207.issue36597@roundup.psfhosted.org>
In-reply-to
Content
On my https://github.com/python/cpython/pull/12770 the doctest job of Travis CI failed with:

https://travis-ci.org/python/cpython/jobs/518572326

mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest 
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
Warning, treated as error:
**********************************************************************
File "library/unittest.mock-examples.rst", line ?, in default
Failed example:
    m.one().two().three()
Expected:
    <MagicMock name='mock.one().two().three()' id='...'>
Got:
    obj dead or exiting
    <MagicMock name='mock.one().two().three()' id='140222049958880'>
Makefile:44: recipe for target 'build' failed
make[1]: *** [build] Error 2

--

I can reproduce this issue on Linux with:

$ cd Doc
$ make venv
$ PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest 

I get random errors:

Warning, treated as error:
**********************************************************************
File "library/datetime.rst", line 686, in default
Failed example:
    d.strftime("%A %d. %B %Y")
Expected:
    'Monday 11. March 2002'
Got:
    'lundi 11. mars 2002'

Warning, treated as error:
**********************************************************************
File "library/collections.rst", line 914, in default
Failed example:
    p._asdict()
Expected:
    {'x': 11, 'y': 22}
Got:
    OrderedDict([('x', 11), ('y', 22)])

Warning, treated as error:
**********************************************************************
File "library/unittest.mock.rst", line ?, in default
Failed example:
    mock.call_args.args
Expected:
    (3, 4)
Got:
    args


The virtual environment uses Sphinx 2.0.1. Can it be a change in Sphinx 2 default configuration?
History
Date User Action Args
2019-04-11 02:49:25vstinnersetrecipients: + vstinner, docs@python
2019-04-11 02:49:25vstinnersetmessageid: <1554950965.55.0.0913094506207.issue36597@roundup.psfhosted.org>
2019-04-11 02:49:25vstinnerlinkissue36597 messages
2019-04-11 02:49:25vstinnercreate