From 759da8647813d8c9576cddef389f55a7192f09ce Mon Sep 17 00:00:00 2001 From: David Euresti Date: Fri, 21 Apr 2017 16:03:19 -0700 Subject: [PATCH] Cleanup six.moves module (#1180) * Cleanup six.moves Regenerate files so all imports are present, comment out imports that fail. Remove useless files. * Fix flake8 --- third_party/2/six/moves/__init__.pyi | 57 +++++++++++---- third_party/2/six/moves/cPickle.pyi | 6 -- third_party/2/six/moves/urllib/__init__.pyi | 5 -- third_party/2/six/moves/urllib/error.pyi | 5 -- third_party/2/six/moves/urllib/parse.pyi | 54 +++++++-------- third_party/2/six/moves/urllib/request.pyi | 6 +- third_party/2/six/moves/urllib/response.pyi | 6 +- .../2/six/moves/urllib/robotparser.pyi | 5 -- third_party/2/six/moves/urllib_error.pyi | 10 --- third_party/2/six/moves/urllib_parse.pyi | 28 -------- third_party/2/six/moves/urllib_request.pyi | 40 ----------- third_party/2/six/moves/urllib_response.pyi | 11 --- .../2/six/moves/urllib_robotparser.pyi | 8 --- third_party/3/six/moves/__init__.pyi | 64 +++++++++++++---- third_party/3/six/moves/cPickle.pyi | 6 -- third_party/3/six/moves/urllib/__init__.pyi | 5 -- third_party/3/six/moves/urllib/error.pyi | 5 -- third_party/3/six/moves/urllib/parse.pyi | 47 +++++++------ third_party/3/six/moves/urllib/request.pyi | 69 +++++++++---------- third_party/3/six/moves/urllib/response.pyi | 7 ++ .../3/six/moves/urllib/robotparser.pyi | 5 -- third_party/3/six/moves/urllib_error.pyi | 10 --- third_party/3/six/moves/urllib_parse.pyi | 20 ------ third_party/3/six/moves/urllib_request.pyi | 41 ----------- third_party/3/six/moves/urllib_response.pyi | 1 - .../3/six/moves/urllib_robotparser.pyi | 8 --- 26 files changed, 187 insertions(+), 342 deletions(-) delete mode 100644 third_party/2/six/moves/cPickle.pyi delete mode 100644 third_party/2/six/moves/urllib_error.pyi delete mode 100644 third_party/2/six/moves/urllib_parse.pyi delete mode 100644 third_party/2/six/moves/urllib_request.pyi delete mode 100644 third_party/2/six/moves/urllib_response.pyi delete mode 100644 third_party/2/six/moves/urllib_robotparser.pyi delete mode 100644 third_party/3/six/moves/cPickle.pyi delete mode 100644 third_party/3/six/moves/urllib_error.pyi delete mode 100644 third_party/3/six/moves/urllib_parse.pyi delete mode 100644 third_party/3/six/moves/urllib_request.pyi delete mode 100644 third_party/3/six/moves/urllib_response.pyi delete mode 100644 third_party/3/six/moves/urllib_robotparser.pyi diff --git a/third_party/2/six/moves/__init__.pyi b/third_party/2/six/moves/__init__.pyi index a59fe7f4e..574717245 100644 --- a/third_party/2/six/moves/__init__.pyi +++ b/third_party/2/six/moves/__init__.pyi @@ -1,6 +1,7 @@ -# Provisional stubs for six.moves (Python 2.7) - -import Cookie as http_cookies +# Stubs for six.moves +# +# Note: Commented out items means they weren't implemented at the time. +# Uncomment them when the modules have been added to the typeshed. from cStringIO import StringIO as cStringIO from itertools import ifilter as filter from itertools import ifilterfalse as filterfalse @@ -20,14 +21,46 @@ from UserString import UserString as UserString from __builtin__ import xrange as xrange from itertools import izip as zip from itertools import izip_longest as zip_longest -import six.moves.cPickle as cPickle -import HTMLParser as html_parser -import htmlentitydefs as html_entities -import httplib as http_client -import ConfigParser as configparser import __builtin__ as builtins - -import six.moves.urllib_parse as urllib_parse -import six.moves.urllib_error as urllib_error +import ConfigParser as configparser +# import copy_reg as copyreg +# import gdbm as dbm_gnu +# import dummy_thread as _dummy_thread +import cookielib as http_cookiejar +import Cookie as http_cookies +import htmlentitydefs as html_entities +import HTMLParser as html_parser +import httplib as http_client +# import email.MIMEMultipart as email_mime_multipart +# import email.MIMENonMultipart as email_mime_nonmultipart +import email.MIMEText as email_mime_text +# import email.MIMEBase as email_mime_base +import BaseHTTPServer as BaseHTTPServer +# import CGIHTTPServer as CGIHTTPServer +# import SimpleHTTPServer as SimpleHTTPServer +import cPickle as cPickle +import Queue as queue +import repr as reprlib +import SocketServer as socketserver +import thread as _thread +# import Tkinter as tkinter +# import Dialog as tkinter_dialog +# import FileDialog as tkinter_filedialog +# import ScrolledText as tkinter_scrolledtext +# import SimpleDialog as tkinter_simpledialog +# import Tix as tkinter_tix +# import ttk as tkinter_ttk +# import Tkconstants as tkinter_constants +# import Tkdnd as tkinter_dnd +# import tkColorChooser as tkinter_colorchooser +# import tkCommonDialog as tkinter_commondialog +# import tkFileDialog as tkinter_tkfiledialog +# import tkFont as tkinter_font +# import tkMessageBox as tkinter_messagebox +# import tkSimpleDialog as tkinter_tksimpledialog +import six.moves.urllib.parse as urllib_parse +import six.moves.urllib.error as urllib_error import six.moves.urllib as urllib -import six.moves.urllib_robotparser as urllib_robotparser +import robotparser as urllib_robotparser +# import xmlrpclib as xmlrpc_client +# import SimpleXMLRPCServer as xmlrpc_server diff --git a/third_party/2/six/moves/cPickle.pyi b/third_party/2/six/moves/cPickle.pyi deleted file mode 100644 index 3feedc6ad..000000000 --- a/third_party/2/six/moves/cPickle.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.cPickle (Python 2.7) - -from cPickle import * # noqa: F403 diff --git a/third_party/2/six/moves/urllib/__init__.pyi b/third_party/2/six/moves/urllib/__init__.pyi index 71523cda7..d08209c51 100644 --- a/third_party/2/six/moves/urllib/__init__.pyi +++ b/third_party/2/six/moves/urllib/__init__.pyi @@ -1,8 +1,3 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib (Python 2.7) - import six.moves.urllib.error as error import six.moves.urllib.parse as parse import six.moves.urllib.request as request diff --git a/third_party/2/six/moves/urllib/error.pyi b/third_party/2/six/moves/urllib/error.pyi index 05eda84a7..044327ee4 100644 --- a/third_party/2/six/moves/urllib/error.pyi +++ b/third_party/2/six/moves/urllib/error.pyi @@ -1,8 +1,3 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.error (Python 2.7) - from urllib2 import URLError as URLError from urllib2 import HTTPError as HTTPError from urllib import ContentTooShortError as ContentTooShortError diff --git a/third_party/2/six/moves/urllib/parse.pyi b/third_party/2/six/moves/urllib/parse.pyi index 25351fb86..4096c27fa 100644 --- a/third_party/2/six/moves/urllib/parse.pyi +++ b/third_party/2/six/moves/urllib/parse.pyi @@ -1,30 +1,24 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.parse (Python 2.7) - -from six.moves.urllib_parse import ( - ParseResult as ParseResult, - SplitResult as SplitResult, - parse_qs as parse_qs, - parse_qsl as parse_qsl, - urldefrag as urldefrag, - urljoin as urljoin, - urlparse as urlparse, - urlsplit as urlsplit, - urlunparse as urlunparse, - urlunsplit as urlunsplit, - quote as quote, - quote_plus as quote_plus, - unquote as unquote, - unquote_plus as unquote_plus, - urlencode as urlencode, - splitquery as splitquery, - splittag as splittag, - splituser as splituser, - uses_fragment as uses_fragment, - uses_netloc as uses_netloc, - uses_params as uses_params, - uses_query as uses_query, - uses_relative as uses_relative, -) +# Stubs for six.moves.urllib.parse +from urlparse import ParseResult as ParseResult +from urlparse import SplitResult as SplitResult +from urlparse import parse_qs as parse_qs +from urlparse import parse_qsl as parse_qsl +from urlparse import urldefrag as urldefrag +from urlparse import urljoin as urljoin +from urlparse import urlparse as urlparse +from urlparse import urlsplit as urlsplit +from urlparse import urlunparse as urlunparse +from urlparse import urlunsplit as urlunsplit +from urllib import quote as quote +from urllib import quote_plus as quote_plus +from urllib import unquote as unquote +from urllib import unquote_plus as unquote_plus +from urllib import urlencode as urlencode +from urllib import splitquery as splitquery +from urllib import splittag as splittag +from urllib import splituser as splituser +from urlparse import uses_fragment as uses_fragment +from urlparse import uses_netloc as uses_netloc +from urlparse import uses_params as uses_params +from urlparse import uses_query as uses_query +from urlparse import uses_relative as uses_relative diff --git a/third_party/2/six/moves/urllib/request.pyi b/third_party/2/six/moves/urllib/request.pyi index 109cda88f..0b8ad8cff 100644 --- a/third_party/2/six/moves/urllib/request.pyi +++ b/third_party/2/six/moves/urllib/request.pyi @@ -1,8 +1,4 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.request (Python 2.7) - +# Stubs for six.moves.urllib.request from urllib2 import urlopen as urlopen from urllib2 import install_opener as install_opener from urllib2 import build_opener as build_opener diff --git a/third_party/2/six/moves/urllib/response.pyi b/third_party/2/six/moves/urllib/response.pyi index d778514d0..83e117fb6 100644 --- a/third_party/2/six/moves/urllib/response.pyi +++ b/third_party/2/six/moves/urllib/response.pyi @@ -1,8 +1,4 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.response (Python 2.7) - +# Stubs for six.moves.urllib.response from urllib import addbase as addbase from urllib import addclosehook as addclosehook from urllib import addinfo as addinfo diff --git a/third_party/2/six/moves/urllib/robotparser.pyi b/third_party/2/six/moves/urllib/robotparser.pyi index 3b337585f..11eef5040 100644 --- a/third_party/2/six/moves/urllib/robotparser.pyi +++ b/third_party/2/six/moves/urllib/robotparser.pyi @@ -1,6 +1 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.robotparser (Python 2.7) - from robotparser import RobotFileParser as RobotFileParser diff --git a/third_party/2/six/moves/urllib_error.pyi b/third_party/2/six/moves/urllib_error.pyi deleted file mode 100644 index 4872659b0..000000000 --- a/third_party/2/six/moves/urllib_error.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_error (Python 2.7) - -from six.moves.urllib.error import ( - URLError as URLError, - HTTPError as HTTPError, - ContentTooShortError as ContentTooShortError, -) diff --git a/third_party/2/six/moves/urllib_parse.pyi b/third_party/2/six/moves/urllib_parse.pyi deleted file mode 100644 index 2416b9642..000000000 --- a/third_party/2/six/moves/urllib_parse.pyi +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_parse (Python 2.7) - -from urlparse import ParseResult as ParseResult -from urlparse import SplitResult as SplitResult -from urlparse import parse_qs as parse_qs -from urlparse import parse_qsl as parse_qsl -from urlparse import urldefrag as urldefrag -from urlparse import urljoin as urljoin -from urlparse import urlparse as urlparse -from urlparse import urlsplit as urlsplit -from urlparse import urlunparse as urlunparse -from urlparse import urlunsplit as urlunsplit -from urllib import quote as quote -from urllib import quote_plus as quote_plus -from urllib import unquote as unquote -from urllib import unquote_plus as unquote_plus -from urllib import urlencode as urlencode -from urllib import splitquery as splitquery -from urllib import splittag as splittag -from urllib import splituser as splituser -from urlparse import uses_fragment as uses_fragment -from urlparse import uses_netloc as uses_netloc -from urlparse import uses_params as uses_params -from urlparse import uses_query as uses_query -from urlparse import uses_relative as uses_relative diff --git a/third_party/2/six/moves/urllib_request.pyi b/third_party/2/six/moves/urllib_request.pyi deleted file mode 100644 index 832055a07..000000000 --- a/third_party/2/six/moves/urllib_request.pyi +++ /dev/null @@ -1,40 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_request (Python 2.7) - -from six.moves.urllib.request import ( - urlopen as urlopen, - install_opener as install_opener, - build_opener as build_opener, - pathname2url as pathname2url, - url2pathname as url2pathname, - getproxies as getproxies, - Request as Request, - OpenerDirector as OpenerDirector, - HTTPDefaultErrorHandler as HTTPDefaultErrorHandler, - HTTPRedirectHandler as HTTPRedirectHandler, - HTTPCookieProcessor as HTTPCookieProcessor, - ProxyHandler as ProxyHandler, - BaseHandler as BaseHandler, - HTTPPasswordMgr as HTTPPasswordMgr, - HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm, - AbstractBasicAuthHandler as AbstractBasicAuthHandler, - HTTPBasicAuthHandler as HTTPBasicAuthHandler, - ProxyBasicAuthHandler as ProxyBasicAuthHandler, - AbstractDigestAuthHandler as AbstractDigestAuthHandler, - HTTPDigestAuthHandler as HTTPDigestAuthHandler, - ProxyDigestAuthHandler as ProxyDigestAuthHandler, - HTTPHandler as HTTPHandler, - HTTPSHandler as HTTPSHandler, - FileHandler as FileHandler, - FTPHandler as FTPHandler, - CacheFTPHandler as CacheFTPHandler, - UnknownHandler as UnknownHandler, - HTTPErrorProcessor as HTTPErrorProcessor, - urlretrieve as urlretrieve, - urlcleanup as urlcleanup, - URLopener as URLopener, - FancyURLopener as FancyURLopener, - proxy_bypass as proxy_bypass, -) diff --git a/third_party/2/six/moves/urllib_response.pyi b/third_party/2/six/moves/urllib_response.pyi deleted file mode 100644 index ca0049255..000000000 --- a/third_party/2/six/moves/urllib_response.pyi +++ /dev/null @@ -1,11 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_response (Python 2.7) - -from six.moves.urllib.response import ( - addbase as addbase, - addclosehook as addclosehook, - addinfo as addinfo, - addinfourl as addinfourl, -) diff --git a/third_party/2/six/moves/urllib_robotparser.pyi b/third_party/2/six/moves/urllib_robotparser.pyi deleted file mode 100644 index d990bb554..000000000 --- a/third_party/2/six/moves/urllib_robotparser.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_robotparser (Python 2.7) - -from six.moves.urllib.robotparser import ( - RobotFileParser as RobotFileParser, -) diff --git a/third_party/3/six/moves/__init__.pyi b/third_party/3/six/moves/__init__.pyi index adce50116..744c95dd4 100644 --- a/third_party/3/six/moves/__init__.pyi +++ b/third_party/3/six/moves/__init__.pyi @@ -1,9 +1,9 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool +# Stubs for six.moves # -# Stubs for six.moves (Python 3.2) +# Note: Commented out items means they weren't implemented at the time. +# Uncomment them when the modules have been added to the typeshed. +import sys -from http import cookies as http_cookies from io import StringIO as cStringIO from builtins import filter as filter from itertools import filterfalse as filterfalse @@ -13,7 +13,6 @@ from builtins import map as map from os import getcwd as getcwd from os import getcwdb as getcwdb from builtins import range as range -from imp import reload as reload_module from functools import reduce as reduce from shlex import quote as shlex_quote from io import StringIO as StringIO @@ -23,14 +22,51 @@ from collections import UserString as UserString from builtins import range as xrange from builtins import zip as zip from itertools import zip_longest as zip_longest -import six.moves.cPickle as cPickle -import html.parser as html_parser -import html.entities as html_entities -import http.client as http_client -import configparser as configparser import builtins as builtins - -import six.moves.urllib_parse as urllib_parse -import six.moves.urllib_error as urllib_error +import configparser as configparser +# import copyreg as copyreg +# import dbm.gnu as dbm_gnu +import _dummy_thread as _dummy_thread +import http.cookiejar as http_cookiejar +import http.cookies as http_cookies +import html.entities as html_entities +import html.parser as html_parser +import http.client as http_client +import email.mime.multipart as email_mime_multipart +import email.mime.nonmultipart as email_mime_nonmultipart +import email.mime.text as email_mime_text +import email.mime.base as email_mime_base +import http.server as BaseHTTPServer +import http.server as CGIHTTPServer +import http.server as SimpleHTTPServer +import pickle as cPickle +import queue as queue +# import reprlib as reprlib +import socketserver as socketserver +import _thread as _thread +import tkinter as tkinter +# import tkinter.dialog as tkinter_dialog +# import tkinter.filedialog as tkinter_filedialog +# import tkinter.scrolledtext as tkinter_scrolledtext +# import tkinter.simpledialog as tkinter_simpledialog +# import tkinter.tix as tkinter_tix +import tkinter.ttk as tkinter_ttk +import tkinter.constants as tkinter_constants +# import tkinter.dnd as tkinter_dnd +# import tkinter.colorchooser as tkinter_colorchooser +# import tkinter.commondialog as tkinter_commondialog +# import tkinter.filedialog as tkinter_tkfiledialog +# import tkinter.font as tkinter_font +# import tkinter.messagebox as tkinter_messagebox +# import tkinter.simpledialog as tkinter_tksimpledialog +import urllib.parse as urllib_parse +import urllib.error as urllib_error import six.moves.urllib as urllib -import six.moves.urllib_robotparser as urllib_robotparser +import urllib.robotparser as urllib_robotparser +# import xmlrpc.client as xmlrpc_client +# import xmlrpc.server as xmlrpc_server + +if sys.version_info >= (3, 4): + from importlib import reload as reload_module +else: + from imp import reload as reload_module diff --git a/third_party/3/six/moves/cPickle.pyi b/third_party/3/six/moves/cPickle.pyi deleted file mode 100644 index f2e2e1222..000000000 --- a/third_party/3/six/moves/cPickle.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.cPickle (Python 3.2) - -from pickle import * # noqa: F403 diff --git a/third_party/3/six/moves/urllib/__init__.pyi b/third_party/3/six/moves/urllib/__init__.pyi index 298b0495e..d08209c51 100644 --- a/third_party/3/six/moves/urllib/__init__.pyi +++ b/third_party/3/six/moves/urllib/__init__.pyi @@ -1,8 +1,3 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib (Python 3.2) - import six.moves.urllib.error as error import six.moves.urllib.parse as parse import six.moves.urllib.request as request diff --git a/third_party/3/six/moves/urllib/error.pyi b/third_party/3/six/moves/urllib/error.pyi index a45b0f71e..83f0d22d4 100644 --- a/third_party/3/six/moves/urllib/error.pyi +++ b/third_party/3/six/moves/urllib/error.pyi @@ -1,8 +1,3 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.error (Python 3.2) - from urllib.error import URLError as URLError from urllib.error import HTTPError as HTTPError from urllib.error import ContentTooShortError as ContentTooShortError diff --git a/third_party/3/six/moves/urllib/parse.pyi b/third_party/3/six/moves/urllib/parse.pyi index c640af258..8b4310a4e 100644 --- a/third_party/3/six/moves/urllib/parse.pyi +++ b/third_party/3/six/moves/urllib/parse.pyi @@ -1,22 +1,27 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool +# Stubs for six.moves.urllib.parse # -# Stubs for six.moves.urllib.parse (Python 3.2) - -from six.moves.urllib_parse import ( - ParseResult as ParseResult, - SplitResult as SplitResult, - parse_qs as parse_qs, - parse_qsl as parse_qsl, - urldefrag as urldefrag, - urljoin as urljoin, - urlparse as urlparse, - urlsplit as urlsplit, - urlunparse as urlunparse, - urlunsplit as urlunsplit, - quote as quote, - quote_plus as quote_plus, - unquote as unquote, - unquote_plus as unquote_plus, - urlencode as urlencode, -) +# Note: Commented out items means they weren't implemented at the time. +# Uncomment them when the modules have been added to the typeshed. +from urllib.parse import ParseResult as ParseResult +from urllib.parse import SplitResult as SplitResult +from urllib.parse import parse_qs as parse_qs +from urllib.parse import parse_qsl as parse_qsl +from urllib.parse import urldefrag as urldefrag +from urllib.parse import urljoin as urljoin +from urllib.parse import urlparse as urlparse +from urllib.parse import urlsplit as urlsplit +from urllib.parse import urlunparse as urlunparse +from urllib.parse import urlunsplit as urlunsplit +from urllib.parse import quote as quote +from urllib.parse import quote_plus as quote_plus +from urllib.parse import unquote as unquote +from urllib.parse import unquote_plus as unquote_plus +from urllib.parse import urlencode as urlencode +# from urllib.parse import splitquery as splitquery +# from urllib.parse import splittag as splittag +# from urllib.parse import splituser as splituser +from urllib.parse import uses_fragment as uses_fragment +from urllib.parse import uses_netloc as uses_netloc +from urllib.parse import uses_params as uses_params +from urllib.parse import uses_query as uses_query +from urllib.parse import uses_relative as uses_relative diff --git a/third_party/3/six/moves/urllib/request.pyi b/third_party/3/six/moves/urllib/request.pyi index b15ced7ea..718a819cd 100644 --- a/third_party/3/six/moves/urllib/request.pyi +++ b/third_party/3/six/moves/urllib/request.pyi @@ -1,40 +1,37 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool +# Stubs for six.moves.urllib.request # -# Stubs for six.moves.urllib.request (Python 3.2) - -from urllib.request import BaseHandler as BaseHandler -from urllib.request import HTTPRedirectHandler as HTTPRedirectHandler -from urllib.request import OpenerDirector as OpenerDirector - +# Note: Commented out items means they weren't implemented at the time. +# Uncomment them when the modules have been added to the typeshed. +from urllib.request import urlopen as urlopen from urllib.request import install_opener as install_opener from urllib.request import build_opener as build_opener - -# from urllib.request import urlopen as urlopen -# from urllib.request import pathname2url as pathname2url -# from urllib.request import url2pathname as url2pathname -# from urllib.request import getproxies as getproxies -# from urllib.request import Request as Request -# from urllib.request import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler -# from urllib.request import HTTPCookieProcessor as HTTPCookieProcessor -# from urllib.request import ProxyHandler as ProxyHandler -# from urllib.request import HTTPPasswordMgr as HTTPPasswordMgr -# from urllib.request import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm -# from urllib.request import AbstractBasicAuthHandler as AbstractBasicAuthHandler -# from urllib.request import HTTPBasicAuthHandler as HTTPBasicAuthHandler -# from urllib.request import ProxyBasicAuthHandler as ProxyBasicAuthHandler -# from urllib.request import AbstractDigestAuthHandler as AbstractDigestAuthHandler -# from urllib.request import HTTPDigestAuthHandler as HTTPDigestAuthHandler -# from urllib.request import ProxyDigestAuthHandler as ProxyDigestAuthHandler -# from urllib.request import HTTPHandler as HTTPHandler -# from urllib.request import HTTPSHandler as HTTPSHandler -# from urllib.request import FileHandler as FileHandler -# from urllib.request import FTPHandler as FTPHandler -# from urllib.request import CacheFTPHandler as CacheFTPHandler -# from urllib.request import UnknownHandler as UnknownHandler -# from urllib.request import HTTPErrorProcessor as HTTPErrorProcessor -# from urllib.request import urlretrieve as urlretrieve -# from urllib.request import urlcleanup as urlcleanup -# from urllib.request import URLopener as URLopener -# from urllib.request import FancyURLopener as FancyURLopener +from urllib.request import pathname2url as pathname2url +from urllib.request import url2pathname as url2pathname +from urllib.request import getproxies as getproxies +from urllib.request import Request as Request +from urllib.request import OpenerDirector as OpenerDirector +from urllib.request import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler +from urllib.request import HTTPRedirectHandler as HTTPRedirectHandler +from urllib.request import HTTPCookieProcessor as HTTPCookieProcessor +from urllib.request import ProxyHandler as ProxyHandler +from urllib.request import BaseHandler as BaseHandler +from urllib.request import HTTPPasswordMgr as HTTPPasswordMgr +from urllib.request import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm +from urllib.request import AbstractBasicAuthHandler as AbstractBasicAuthHandler +from urllib.request import HTTPBasicAuthHandler as HTTPBasicAuthHandler +from urllib.request import ProxyBasicAuthHandler as ProxyBasicAuthHandler +from urllib.request import AbstractDigestAuthHandler as AbstractDigestAuthHandler +from urllib.request import HTTPDigestAuthHandler as HTTPDigestAuthHandler +from urllib.request import ProxyDigestAuthHandler as ProxyDigestAuthHandler +from urllib.request import HTTPHandler as HTTPHandler +from urllib.request import HTTPSHandler as HTTPSHandler +from urllib.request import FileHandler as FileHandler +from urllib.request import FTPHandler as FTPHandler +from urllib.request import CacheFTPHandler as CacheFTPHandler +from urllib.request import UnknownHandler as UnknownHandler +from urllib.request import HTTPErrorProcessor as HTTPErrorProcessor +from urllib.request import urlretrieve as urlretrieve +from urllib.request import urlcleanup as urlcleanup +from urllib.request import URLopener as URLopener +from urllib.request import FancyURLopener as FancyURLopener # from urllib.request import proxy_bypass as proxy_bypass diff --git a/third_party/3/six/moves/urllib/response.pyi b/third_party/3/six/moves/urllib/response.pyi index c3b34a839..9f681ea33 100644 --- a/third_party/3/six/moves/urllib/response.pyi +++ b/third_party/3/six/moves/urllib/response.pyi @@ -1 +1,8 @@ +# Stubs for six.moves.urllib.response +# +# Note: Commented out items means they weren't implemented at the time. +# Uncomment them when the modules have been added to the typeshed. +# from urllib.response import addbase as addbase +# from urllib.response import addclosehook as addclosehook +# from urllib.response import addinfo as addinfo from urllib.response import addinfourl as addinfourl diff --git a/third_party/3/six/moves/urllib/robotparser.pyi b/third_party/3/six/moves/urllib/robotparser.pyi index 669035523..bccda14b4 100644 --- a/third_party/3/six/moves/urllib/robotparser.pyi +++ b/third_party/3/six/moves/urllib/robotparser.pyi @@ -1,6 +1 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib.robotparser (Python 3.2) - from urllib.robotparser import RobotFileParser as RobotFileParser diff --git a/third_party/3/six/moves/urllib_error.pyi b/third_party/3/six/moves/urllib_error.pyi deleted file mode 100644 index 136866442..000000000 --- a/third_party/3/six/moves/urllib_error.pyi +++ /dev/null @@ -1,10 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_error (Python 3.2) - -from six.moves.urllib.error import ( - URLError as URLError, - HTTPError as HTTPError, - ContentTooShortError as ContentTooShortError, -) diff --git a/third_party/3/six/moves/urllib_parse.pyi b/third_party/3/six/moves/urllib_parse.pyi deleted file mode 100644 index 96f6207ef..000000000 --- a/third_party/3/six/moves/urllib_parse.pyi +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_parse (Python 3.2) - -from urllib.parse import ParseResult as ParseResult -from urllib.parse import SplitResult as SplitResult -from urllib.parse import parse_qs as parse_qs -from urllib.parse import parse_qsl as parse_qsl -from urllib.parse import urldefrag as urldefrag -from urllib.parse import urljoin as urljoin -from urllib.parse import urlparse as urlparse -from urllib.parse import urlsplit as urlsplit -from urllib.parse import urlunparse as urlunparse -from urllib.parse import urlunsplit as urlunsplit -from urllib.parse import quote as quote -from urllib.parse import quote_plus as quote_plus -from urllib.parse import unquote as unquote -from urllib.parse import unquote_plus as unquote_plus -from urllib.parse import urlencode as urlencode diff --git a/third_party/3/six/moves/urllib_request.pyi b/third_party/3/six/moves/urllib_request.pyi deleted file mode 100644 index 168f63532..000000000 --- a/third_party/3/six/moves/urllib_request.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_request (Python 3.2) - -from six.moves.urllib.request import ( - install_opener as install_opener, - build_opener as build_opener, - BaseHandler as BaseHandler, - OpenerDirector as OpenerDirector, - HTTPRedirectHandler as HTTPRedirectHandler, - - # urlopen as urlopen, - # pathname2url as pathname2url, - # url2pathname as url2pathname, - # getproxies as getproxies, - # Request as Request, - # HTTPDefaultErrorHandler as HTTPDefaultErrorHandler, - # HTTPCookieProcessor as HTTPCookieProcessor, - # ProxyHandler as ProxyHandler, - # HTTPPasswordMgr as HTTPPasswordMgr, - # HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm, - # AbstractBasicAuthHandler as AbstractBasicAuthHandler, - # HTTPBasicAuthHandler as HTTPBasicAuthHandler, - # ProxyBasicAuthHandler as ProxyBasicAuthHandler, - # AbstractDigestAuthHandler as AbstractDigestAuthHandler, - # HTTPDigestAuthHandler as HTTPDigestAuthHandler, - # ProxyDigestAuthHandler as ProxyDigestAuthHandler, - # HTTPHandler as HTTPHandler, - # HTTPSHandler as HTTPSHandler, - # FileHandler as FileHandler, - # FTPHandler as FTPHandler, - # CacheFTPHandler as CacheFTPHandler, - # UnknownHandler as UnknownHandler, - # HTTPErrorProcessor as HTTPErrorProcessor, - # urlretrieve as urlretrieve, - # urlcleanup as urlcleanup, - # URLopener as URLopener, - # FancyURLopener as FancyURLopener, - # proxy_bypass as proxy_bypass, -) diff --git a/third_party/3/six/moves/urllib_response.pyi b/third_party/3/six/moves/urllib_response.pyi deleted file mode 100644 index 1574d7d7b..000000000 --- a/third_party/3/six/moves/urllib_response.pyi +++ /dev/null @@ -1 +0,0 @@ -from six.moves.urllib.response import addinfourl as addinfourl diff --git a/third_party/3/six/moves/urllib_robotparser.pyi b/third_party/3/six/moves/urllib_robotparser.pyi deleted file mode 100644 index 8b4ca73e4..000000000 --- a/third_party/3/six/moves/urllib_robotparser.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Generated by stubtool 0.1, DO NOT EDIT -# See https://github.com/o11c/stubtool -# -# Stubs for six.moves.urllib_robotparser (Python 3.2) - -from six.moves.urllib.robotparser import ( - RobotFileParser as RobotFileParser, -)