From d5a918de7ba5d88d31d6377b372f112c29308de4 Mon Sep 17 00:00:00 2001 From: Bouteillebleu Date: Mon, 19 Aug 2019 14:34:29 +0100 Subject: [PATCH] Add stubs for CGIHTTPServer (#3196) This commit adds: * Stubs for CGIHTTPServer in the Python 2 standard library, as requested in #1147. * Stubs for six.moves.CGIHTTPServer in Python 2, as requested in #22. --- stdlib/2/CGIHTTPServer.pyi | 8 ++++++++ third_party/2/six/moves/CGIHTTPServer.pyi | 1 + third_party/2/six/moves/__init__.pyi | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 stdlib/2/CGIHTTPServer.pyi create mode 100644 third_party/2/six/moves/CGIHTTPServer.pyi diff --git a/stdlib/2/CGIHTTPServer.pyi b/stdlib/2/CGIHTTPServer.pyi new file mode 100644 index 000000000..4eae666d8 --- /dev/null +++ b/stdlib/2/CGIHTTPServer.pyi @@ -0,0 +1,8 @@ +# Stubs for CGIHTTPServer (Python 2.7) + +from typing import List +import SimpleHTTPServer + +class CGIHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + cgi_directories: List[str] + def do_POST(self) -> None: ... diff --git a/third_party/2/six/moves/CGIHTTPServer.pyi b/third_party/2/six/moves/CGIHTTPServer.pyi new file mode 100644 index 000000000..b39390c67 --- /dev/null +++ b/third_party/2/six/moves/CGIHTTPServer.pyi @@ -0,0 +1 @@ +from CGIHTTPServer import * diff --git a/third_party/2/six/moves/__init__.pyi b/third_party/2/six/moves/__init__.pyi index ade03042c..2bc82cbc6 100644 --- a/third_party/2/six/moves/__init__.pyi +++ b/third_party/2/six/moves/__init__.pyi @@ -36,7 +36,7 @@ from . import http_client from . import email_mime_text # import email.MIMEBase as email_mime_base from . import BaseHTTPServer -# import CGIHTTPServer as CGIHTTPServer +from . import CGIHTTPServer from . import SimpleHTTPServer from . import cPickle from . import queue