@@ -320,9 +320,16 @@ provides three different variants:
320
320
321
321
.. class :: SimpleHTTPRequestHandler(request, client_address, server, directory=None)
322
322
323
- This class serves files from the current directory and below, directly
323
+ This class serves files from the directory *directory * and below,
324
+ or the current directory if *directory * is not provided, directly
324
325
mapping the directory structure to HTTP requests.
325
326
327
+ .. versionadded :: 3.7
328
+ The *directory * parameter.
329
+
330
+ .. versionchanged :: 3.9
331
+ The *directory * parameter accepts a :term: `path-like object `.
332
+
326
333
A lot of the work, such as parsing the request, is done by the base class
327
334
:class: `BaseHTTPRequestHandler `. This class implements the :func: `do_GET `
328
335
and :func: `do_HEAD ` functions.
@@ -345,13 +352,6 @@ provides three different variants:
345
352
This dictionary is no longer filled with the default system mappings,
346
353
but only contains overrides.
347
354
348
- .. attribute :: directory
349
-
350
- If not specified, the directory to serve is the current working directory.
351
-
352
- .. versionchanged :: 3.9
353
- Accepts a :term: `path-like object `.
354
-
355
355
The :class: `SimpleHTTPRequestHandler ` class defines the following methods:
356
356
357
357
.. method :: do_HEAD()
0 commit comments