Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Python documentation with doctest logs a ResourceWarning in Doc/library/nntplib.rst #89463

Closed
vstinner opened this issue Sep 27, 2021 · 3 comments
Labels
3.11 only security fixes docs Documentation in the Doc dir

Comments

@vstinner
Copy link
Member

BPO 45300
Nosy @vstinner

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 = None
created_at = <Date 2021-09-27.13:29:57.191>
labels = ['3.11', 'docs']
title = 'Building Python documentation with doctest logs a ResourceWarning in Doc/library/nntplib.rst'
updated_at = <Date 2021-09-27.13:29:57.191>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2021-09-27.13:29:57.191>
actor = 'vstinner'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2021-09-27.13:29:57.191>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 45300
keywords = []
message_count = 1.0
messages = ['402709']
nosy_count = 2.0
nosy_names = ['vstinner', 'docs@python']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue45300'
versions = ['Python 3.11']

@vstinner
Copy link
Member Author

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)

@vstinner vstinner added the 3.11 only security fixes label Sep 27, 2021
@vstinner vstinner added docs Documentation in the Doc dir 3.11 only security fixes labels Sep 27, 2021
@vstinner vstinner added the docs Documentation in the Doc dir label Sep 27, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@hugovk
Copy link
Member

hugovk commented Apr 11, 2022

Note the nntplib module is deprecated in 3.11 and set for removal in 3.13.

See PEP 594 – Removing dead batteries from the standard library and #91217.

@AA-Turner
Copy link
Member

Closing per Hugo's comment.

A

@AA-Turner AA-Turner closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

3 participants