classification
Title: make doctest (Sphinx) emits a lot of warnings
Type: Stage:
Components: Build Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: corona10, gvanrossum, matrixise, mdk, vstinner, xtreak
Priority: normal Keywords:

Created on 2018-11-21 21:27 by vstinner, last changed 2019-06-11 18:15 by gvanrossum.

Messages (5)
msg330217 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-21 21:27
The following commands emits a lot of warnings:

make PYTHON=../python SPHINXOPTS="-q -W -j4" -C Doc/ venv doctest
# adapt PYTHON to point to Python 3.8 compiled in debug mmode

Travis CI logs:

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

make: Entering directory `/home/travis/build/python/cpython/Doc'
../python -m venv ./venv
(...)
The venv has been created in the ./venv directory
make[1]: Entering directory `/home/travis/build/python/cpython/Doc'
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/venv/lib/python3.8/site-packages/babel/localedata.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/jinja2/sandbox.py:82: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableSet, MutableMapping, MutableSequence
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/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/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/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/venv/lib/python3.8/site-packages/sphinx/environment/__init__.py:340: RemovedInSphinx30Warning: env.versionchanges() is deprecated. Please use ChangeSetDomain instead.
  for version, changes in other.versionchanges.items():
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/sphinx/environment/__init__.py:341: RemovedInSphinx30Warning: env.versionchanges() is deprecated. Please use ChangeSetDomain instead.
  self.versionchanges.setdefault(version, []).extend(
/home/travis/build/python/cpython/Doc/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/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/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/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/venv/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2130: RemovedInSphinx40Warning: highlightlang directive is deprecated. Please use highlight directive instead.
  result = directive_instance.run()
/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)
<doctest default[2]>:1: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  formatargspec(*getfullargspec(f))
<doctest default[0]>:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
obj dead or exiting
/home/travis/build/python/cpython/Lib/socket.py:660: ResourceWarning: unclosed <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.17.0.8', 40136), raddr=('195.159.176.226', 119)>
  self._sock = None
ResourceWarning: Enable tracemalloc to get the object allocation traceback
make[1]: Leaving directory `/home/travis/build/python/cpython/Doc'
make: Leaving directory `/home/travis/build/python/cpython/Doc'

The command "if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
  XVFB_RUN=xvfb-run;
fi

$XVFB_RUN make buildbottest TESTOPTS="-j4 -uall,-cpu"
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
  $XVFB_RUN make PYTHON=../python SPHINXOPTS="-q -W -j4" -C Doc/ venv doctest
fi
" exited with 0.
msg330233 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python triager) Date: 2018-11-22 07:51
They are warnings related to third party packages used for doctest and some of them might become incompatible with https://github.com/python/cpython/pull/10596. Related discussion : issue35109
msg330235 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-22 08:00
> They are warnings related to third party packages used for doctest and some of them might become incompatible with https://github.com/python/cpython/pull/10596. Related discussion : issue35109

We should help these packages to be fixed :-)
msg330236 - (view) Author: Dong-hee Na (corona10) * Date: 2018-11-22 08:37
Looks like they already fixed it.

- jinja2: https://github.com/pallets/jinja/commit/31bf9b7e71c3fee3b7866ffdc0f70f4525a490d9
- babel: https://github.com/python-babel/babel/commit/65d6bf39f2a2b4bbbbc02cd1e00c44ce9d7c1c5b

We should wait their release :)
msg345259 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2019-06-11 18:15
I still get some warnings about docutils itself, e.g.

/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/_html_base.py:1035: SyntaxWarning: invalid escape sequence \(
  'mathjax': ('\(%s\)', '\\begin{%s}\n%s\n\\end{%s}'),
/Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/math2html.py:4103: SyntaxWarning: invalid escape sequence \{
  """Check for an empty command: look for command disguised as ending.
/Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/math2html.py:4563: SyntaxWarning: invalid escape sequence \e
  "A \\begin{}...\end command and what it entails (array, cases, aligned)"
/Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/latex2mathml.py:154: SyntaxWarning: invalid escape sequence \i
  '\in': '\u2209',
/Users/guido/v38/lib/python3.8/site-packages/docutils/utils/math/latex2mathml.py:155: SyntaxWarning: invalid escape sequence \e
  '\equiv': '\u2262'}
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1197: SyntaxWarning: invalid escape sequence \w
  none ) = re.split('(\w+)(.*)', settings.literal_block_env)
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1463: SyntaxWarning: invalid escape sequence \ 
  """Return text with 'problematic' characters escaped.
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1562: SyntaxWarning: invalid escape sequence \p
  """Return list of label definitions for all ids of `node`
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:1922: SyntaxWarning: invalid escape sequence \p
  self.title.insert(0, '\phantomsection%\n  ')
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2269: SyntaxWarning: invalid escape sequence \d
  match = re.match('(\d*\.?\d*)\s*(\S*)', length_str)
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2381: SyntaxWarning: invalid escape sequence \i
  self.out.append('\item[] ')
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2525: SyntaxWarning: invalid escape sequence \(
  wrapper = '\(%s\)'
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2804: SyntaxWarning: invalid escape sequence \c
  self.out.append('\n\n{\color{red}%s/%s} in \\texttt{%s}%s\n' %
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/latex2e/__init__.py:2892: SyntaxWarning: invalid escape sequence \l
  self.out.append('}] \leavevmode ')
/Users/guido/v38/lib/python3.8/site-packages/docutils/writers/manpage.py:371: SyntaxWarning: invalid escape sequence \-
  "%(title)s \- %(subtitle)s\n")
History
Date User Action Args
2019-06-11 18:15:07gvanrossumsetnosy: + gvanrossum

messages: + msg345259
versions: - Python 3.8
2018-11-22 08:37:27corona10setnosy: + corona10
messages: + msg330236
2018-11-22 08:00:33vstinnersetmessages: + msg330235
2018-11-22 07:51:16xtreaksetnosy: + xtreak
messages: + msg330233
2018-11-21 21:27:21vstinnersetnosy: + matrixise, mdk
2018-11-21 21:27:11vstinnercreate