[Python-checkins] bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)

Julien Palard webhook-mailer at python.org
Tue May 29 16:10:33 EDT 2018


https://github.com/python/cpython/commit/1cee216cf383eade641aed22f4ec7d4cb565ecff
commit: 1cee216cf383eade641aed22f4ec7d4cb565ecff
branch: master
author: Géry Ogam <gery.ogam at gmail.com>
committer: Julien Palard <julien at palard.fr>
date: 2018-05-29T22:10:30+02:00
summary:

bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)

files:
M Doc/library/http.server.rst
M Lib/http/server.py
M Misc/NEWS.d/next/Library/2017-12-27-21-55-19.bpo-31639.l3avDJ.rst

diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index 16cfa1798aef..0bd7f778cec0 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -33,7 +33,7 @@ handler.  Code to create and run the server looks like this::
    :attr:`server_port`. The server is accessible by the handler, typically
    through the handler's :attr:`server` instance variable.
 
-.. class:: ThreadedHTTPServer(server_address, RequestHandlerClass)
+.. class:: ThreadingHTTPServer(server_address, RequestHandlerClass)
 
    This class is identical to HTTPServer but uses threads to handle
    requests by using the :class:`~socketserver.ThreadingMixIn`. This
@@ -43,7 +43,7 @@ handler.  Code to create and run the server looks like this::
    .. versionadded:: 3.7
 
 
-The :class:`HTTPServer` and :class:`ThreadedHTTPServer` must be given
+The :class:`HTTPServer` and :class:`ThreadingHTTPServer` must be given
 a *RequestHandlerClass* on instantiation, of which this module
 provides three different variants:
 
diff --git a/Lib/http/server.py b/Lib/http/server.py
index a2726ab89750..ea0e295d2834 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -83,7 +83,7 @@
 __version__ = "0.6"
 
 __all__ = [
-    "HTTPServer", "ThreadedHTTPServer", "BaseHTTPRequestHandler",
+    "HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler",
     "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler",
 ]
 
@@ -140,7 +140,7 @@ def server_bind(self):
         self.server_port = port
 
 
-class ThreadedHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
+class ThreadingHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
     daemon_threads = True
 
 
@@ -1217,7 +1217,7 @@ def run_cgi(self):
 
 
 def test(HandlerClass=BaseHTTPRequestHandler,
-         ServerClass=ThreadedHTTPServer,
+         ServerClass=ThreadingHTTPServer,
          protocol="HTTP/1.0", port=8000, bind=""):
     """Test the HTTP request handler class.
 
diff --git a/Misc/NEWS.d/next/Library/2017-12-27-21-55-19.bpo-31639.l3avDJ.rst b/Misc/NEWS.d/next/Library/2017-12-27-21-55-19.bpo-31639.l3avDJ.rst
index 581ac8266b16..741b276a3022 100644
--- a/Misc/NEWS.d/next/Library/2017-12-27-21-55-19.bpo-31639.l3avDJ.rst
+++ b/Misc/NEWS.d/next/Library/2017-12-27-21-55-19.bpo-31639.l3avDJ.rst
@@ -1,2 +1,2 @@
-http.server now exposes a ThreadedHTTPServer class and uses it when the
+http.server now exposes a ThreadingHTTPServer class and uses it when the
 module is run with ``-m`` to cope with web browsers pre-opening sockets.



More information about the Python-checkins mailing list