From 9aaa9fae0f95c951531e0c7a7f64d44072c66e81 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Mon, 10 May 2021 14:52:22 +0200 Subject: [PATCH 1/2] Doc: http.server: directory is not a class attribute, but an argument. --- Doc/library/http.server.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 729d7e37137a81..5217a8bbdc2e25 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -320,9 +320,16 @@ provides three different variants: .. class:: SimpleHTTPRequestHandler(request, client_address, server, directory=None) - This class serves files from the current directory and below, directly + This class serves files from the directory *directory* and below, + or the current directory if *directory* is not provided, directly mapping the directory structure to HTTP requests. + .. versionadded:: 3.7 + The *directory* parameter. + + .. versionchanged:: 3.9 + The *directory* parameter Accepts a :term:`path-like object`. + A lot of the work, such as parsing the request, is done by the base class :class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` and :func:`do_HEAD` functions. @@ -345,13 +352,6 @@ provides three different variants: This dictionary is no longer filled with the default system mappings, but only contains overrides. - .. attribute:: directory - - If not specified, the directory to serve is the current working directory. - - .. versionchanged:: 3.9 - Accepts a :term:`path-like object`. - The :class:`SimpleHTTPRequestHandler` class defines the following methods: .. method:: do_HEAD() From 41f7273409c1b0aedf880b84beff46cf81e4a6cc Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Mon, 10 May 2021 14:54:43 +0200 Subject: [PATCH 2/2] uncapitalize --- Doc/library/http.server.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 5217a8bbdc2e25..029e9ec5401e08 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -328,7 +328,7 @@ provides three different variants: The *directory* parameter. .. versionchanged:: 3.9 - The *directory* parameter Accepts a :term:`path-like object`. + The *directory* parameter accepts a :term:`path-like object`. A lot of the work, such as parsing the request, is done by the base class :class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET`