]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] Add a security warning about `pydoc`'s HTTP server (GH-150409)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 May 2026 19:08:02 +0000 (21:08 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2026 19:08:02 +0000 (20:08 +0100)
(cherry picked from commit 5535c1f9c08e929f96fa5d798277e3a2c91ed12a)

Co-authored-by: Stan Ulbrych <stan@python.org>
Doc/library/pydoc.rst

index e8f153ee1b35ce03b812ccc05e2fd0b5aca5b97c..a59793c25159df9d5a6a77f067ff20179427db14 100644 (file)
@@ -71,6 +71,11 @@ will start a HTTP server on port 1234, allowing you to browse the
 documentation at ``http://localhost:1234/`` in your preferred web browser.
 Specifying ``0`` as the port number will select an arbitrary unused port.
 
+.. warning::
+
+   The :mod:`!pydoc` HTTP server is intended for local use during
+   development and is not suitable for production use.
+
 :program:`python -m pydoc -n <hostname>` will start the server listening at the given
 hostname.  By default the hostname is 'localhost' but if you want the server to
 be reached from other machines, you may want to change the host name that the