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.

classification
Title: Building Python documentation with doctest logs a ResourceWarning in Doc/library/nntplib.rst
Type: Stage:
Components: Documentation Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, vstinner
Priority: normal Keywords:

Created on 2021-09-27 13:29 by vstinner, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg402709 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-27 13:29
Build Python documentatioin with:

make -C Doc/ PYTHON=../python venv
LANG= PYTHONTRACEMALLOC=10 make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j10" doctest 2>&1|tee log

See the logs:

/home/vstinner/python/main/Lib/socket.py:776: ResourceWarning: unclosed <socket.socket fd=9, family=AF_INET, type=SOCK_STREAM, proto=6, laddr=('192.168.1.6', 42216), raddr=('116.202.254.214', 119)>
  self._sock = None
Object allocated at (most recent call last):
  File "/home/vstinner/python/main/Doc/venv/lib/python3.11/site-packages/sphinx/builders/__init__.py", lineno 361
    self.write(docnames, list(updated_docnames), method)
  File "/home/vstinner/python/main/Doc/venv/lib/python3.11/site-packages/sphinx/ext/doctest.py", lineno 366
    self.test_doc(docname, doctree)
  File "/home/vstinner/python/main/Doc/venv/lib/python3.11/site-packages/sphinx/ext/doctest.py", lineno 470
    self.test_group(group)
  File "/home/vstinner/python/main/Doc/venv/lib/python3.11/site-packages/sphinx/ext/doctest.py", lineno 554
    self.test_runner.run(test, out=self._warn_out, clear_globs=False)
  File "/home/vstinner/python/main/Lib/doctest.py", lineno 1495
    return self.__run(test, compileflags, out)
  File "/home/vstinner/python/main/Lib/doctest.py", lineno 1348
    exec(compile(example.source, filename, "single",
  File "<doctest default[0]>", lineno 1
  File "/home/vstinner/python/main/Lib/nntplib.py", lineno 334
    self.sock = self._create_socket(timeout)
  File "/home/vstinner/python/main/Lib/nntplib.py", lineno 399
    return socket.create_connection((self.host, self.port), timeout)
  File "/home/vstinner/python/main/Lib/socket.py", lineno 828
    sock = socket(af, socktype, proto)
History
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89463
2021-09-27 13:29:57vstinnercreate