Repository navigation
Closed
Labels
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2019-04-11.10:38:52.476>
created_at = <Date 2019-04-11.02:49:25.530>
labels = ['release-blocker', '3.8', 'docs']
title = 'Travis CI: doctest failure'
updated_at = <Date 2019-04-11.10:38:52.476>
user = 'https://github.com/vstinner'bugs.python.org fields:
activity = <Date 2019-04-11.10:38:52.476>
actor = 'methane'
assignee = 'docs@python'
closed = True
closed_date = <Date 2019-04-11.10:38:52.476>
closer = 'methane'
components = ['Documentation']
creation = <Date 2019-04-11.02:49:25.530>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 36597
keywords = ['patch']
message_count = 18.0
messages = ['339919', '339932', '339933', '339934', '339935', '339936', '339937', '339938', '339939', '339940', '339941', '339942', '339943', '339944', '339945', '339946', '339951', '339957']
nosy_count = 5.0
nosy_names = ['vstinner', 'methane', 'docs@python', 'lukasz.langa', 'mdk']
pr_nums = ['12775', '12776', '12778', '12779']
priority = 'release blocker'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue36597'
versions = ['Python 3.8']
Activity
vstinner commentedon Apr 11, 2019
On my #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:
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?
vstinner commentedon Apr 11, 2019
Well, same problem with Sphinx 1.8.5. No idea why the job started to fail.
methane commentedon Apr 11, 2019
On Thu, Apr 11, 2019 at 11:49 AM STINNER Victor <[email protected]> wrote:
I'm not sure where "obj is dead or exiting" came from.
It seems it is caused by non English locale.
You may run doctest with existing Python, not Python 3.8.
I'm not sure about this.
Inada Naoki <[email protected]>
vstinner commentedon Apr 11, 2019
Right, but why did it start to fail since yesterday?
I used the command from the .travis.yml job: "... make -C Doc/ PYTHON=../python "...". It explicitly picks the Python it just compiled.
Why would we like to check the doctests using a random Python version, whereas it's Python 3.8 documentation?
vstinner commentedon Apr 11, 2019
8 hours ago, the job still passed at the top of the the master branch (commit a9bd892):
https://travis-ci.org/python/cpython/jobs/518281237
"Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Pygments-2.3.1 Sphinx-2.0.1 alabaster-0.7.12 babel-2.6.0 blurb-1.0.7 certifi-2019.3.9 chardet-3.0.4 docutils-0.14 idna-2.8 imagesize-1.1.0 packaging-19.0 pyparsing-2.4.0 python-docs-theme-2018.7 pytz-2019.1 requests-2.21.0 six-1.12.0 snowballstemmer-1.2.1 sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1 sphinxcontrib-htmlhelp-1.0.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3 urllib3-1.24.1"
...
PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest
...
The command "xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" doctest" exited with 0.
---
6 hours ago, it failed:
https://travis-ci.org/python/cpython/jobs/518572326
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Pygments-2.3.1 Sphinx-2.0.1 alabaster-0.7.12 babel-2.6.0 blurb-1.0.7 certifi-2019.3.9 chardet-3.0.4 docutils-0.14 idna-2.8 imagesize-1.1.0 packaging-19.0 pyparsing-2.4.0 python-docs-theme-2018.7 pytz-2019.1 requests-2.21.0 six-1.12.0 snowballstemmer-1.2.1 sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1 sphinxcontrib-htmlhelp-1.0.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3 urllib3-1.24.1
Warning, treated as error: (...)
--
In the 2 builds, pip installed the the same Python modules versions.
I compared the raw logs of the 2 builds. In short, they are the same.
Maybe the job already failed previously, but only randomly?
methane commentedon Apr 11, 2019
Is it an error start to fail since yesterday?
As far as reading your first report, this is happen only in your local
environment.
This error is in your environment too. Maybe you re-used old venv?
Because it "doctest". Python behavior (repr) can be changed.
Python 3.8 replaces some OrderedDict usage with regular dict.
vstinner commentedon Apr 11, 2019
New changeset adff01e by Victor Stinner in branch 'master':
bpo-36597: Disable Travis CI doctest job (GH-12775)
adff01e
vstinner commentedon Apr 11, 2019
I mark this issue as a release blocker to not forget it. I disabled the Travis CI doctest job to repair the CI, but we have to investigate why it started to fail yesterday.
vstinner commentedon Apr 11, 2019
See the beginning of my first message, the doctest prevents me to merge a PR. But I tested on the master branch without my change, and I get the same issue locally, and the issues seems to be unrelated to my change.
"""
On my #12770 the doctest job of Travis CI failed with:
https://travis-ci.org/python/cpython/jobs/518572326
"""
tirkarthi commentedon Apr 11, 2019
"Object dead or exiting" is a less frequent random error with doctest. I am not sure from where it occurs but occurs for different tests at different times and is overlooked in Travis since the next runs are fine.
Sample old builds :
https://travis-ci.org/python/cpython/jobs/517606752
https://travis-ci.org/python/cpython/jobs/510847596
methane commentedon Apr 11, 2019
You did not show travis build link which failed other than "obj dead or exiting" error.
Don't all other errors happened only on your environment? If no, please link to travis build link.
As far as I can confirm now, only "obj dead or exiting" error is problem in Travis.
I suspect your environment (locale and venv used to run doctest), not your changes.
Only "obj dead or exiting" happened in the job.
methane commentedon Apr 11, 2019
https://github.com/python/cpython/blob/master/Doc/library/weakref.rst#finalizer-objects
>>> obj = Object() >>> weakref.finalize(obj, print, "obj dead or exiting") #doctest:+ELLIPSIS <finalize object at ...; for 'Object' at ...> >>> exit() #doctest:+SKIP obj dead or exitingNote that "#doctest:+SKIP". print("obj dead or exiting") is called after weakref test.
This may caused random doctest fail.
vstinner commentedon Apr 11, 2019
Really? When I click on https://travis-ci.org/python/cpython/jobs/518572326 (the second link of my first message), I still see:
"""
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
"""
This error comes from Travis CI.
You can ignore the date failure, but how is the following error related to my environment?
"""
File "library/collections.rst", line 914, in default
Failed example:
p._asdict()
Expected:
{'x': 11, 'y': 22}
Got:
OrderedDict([('x', 11), ('y', 22)])
"""
I used the same commands than .travis.yml. If we are unable to get the same environment than in Travis CI, we have a big problem.
I agree to ignore the locale, this is a lower priority issue.
methane commentedon Apr 11, 2019
On Thu, Apr 11, 2019 at 5:19 PM STINNER Victor <[email protected]> wrote:
It is "obj dead or exiting" error. I didn't say it is caused by your
environment.
It is only error happened in Travis.
namedtuple._asdict() changed to return dict instead of OrderedDict.
If your venv is created before the change, this error can be happened.
methane commentedon Apr 11, 2019
I think PR-12776 fixed "obj dead or exiting" error.
https://travis-ci.org/python/cpython/jobs/518656385
methane commentedon Apr 11, 2019
New changeset 57b1a28 by Inada Naoki in branch 'master':
bpo-36597: fix random doctest failure (GH-12776)
57b1a28
methane commentedon Apr 11, 2019
New changeset b3c92c6 by Inada Naoki in branch 'master':
bpo-36597: fix weakref example code (GH-12779)
b3c92c6
methane commentedon Apr 11, 2019
New changeset ac31da8 by Inada Naoki in branch '3.7':
bpo-36597: fix random doctest failure (GH-12778)
ac31da8