From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 29 May 2026 19:07:29 +0000 (+0200) Subject: [3.15] Add a security warning about `pydoc`'s HTTP server (#150573) X-Git-Tag: v3.15.0b2~45 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=59e709b17ee84aa407ca9e0a3994916cb48ff909;p=thirdparty%2FPython%2Fcpython.git [3.15] Add a security warning about `pydoc`'s HTTP server (#150573) (cherry picked from commit 5535c1f9c08e929f96fa5d798277e3a2c91ed12a) Co-authored-by: Stan Ulbrych --- diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index f236eba84576..a0cfb440a36f 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -68,6 +68,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 ` 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