From a7253601392a4b2dd6e68ee77656b002eff80727 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 12:45:32 -0800 Subject: [PATCH 1/7] Make six.moves into a module. --- third_party/2.7/six/{moves.pyi => moves/__init__.pyi} | 0 third_party/3/six/{moves.pyi => moves/__init__.pyi} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename third_party/2.7/six/{moves.pyi => moves/__init__.pyi} (100%) rename third_party/3/six/{moves.pyi => moves/__init__.pyi} (100%) diff --git a/third_party/2.7/six/moves.pyi b/third_party/2.7/six/moves/__init__.pyi similarity index 100% rename from third_party/2.7/six/moves.pyi rename to third_party/2.7/six/moves/__init__.pyi diff --git a/third_party/3/six/moves.pyi b/third_party/3/six/moves/__init__.pyi similarity index 100% rename from third_party/3/six/moves.pyi rename to third_party/3/six/moves/__init__.pyi From f036fd05f3a944bad0f02d34c9e7ba11ddce33e6 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 15:40:33 -0800 Subject: [PATCH 2/7] Add stubs for urllib.robotparser. --- stdlib/2.7/robotparser.pyi | 7 +++++++ stdlib/3/urllib/robotparser.pyi | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 stdlib/2.7/robotparser.pyi create mode 100644 stdlib/3/urllib/robotparser.pyi diff --git a/stdlib/2.7/robotparser.pyi b/stdlib/2.7/robotparser.pyi new file mode 100644 index 000000000..403039ae9 --- /dev/null +++ b/stdlib/2.7/robotparser.pyi @@ -0,0 +1,7 @@ +class RobotFileParser: + def set_url(self, url: str): ... + def read(self): ... + def parse(self, lines: str): ... + def can_fetch(self, user_agent: str, url: str): ... + def mtime(self): ... + def modified(self): ... diff --git a/stdlib/3/urllib/robotparser.pyi b/stdlib/3/urllib/robotparser.pyi new file mode 100644 index 000000000..403039ae9 --- /dev/null +++ b/stdlib/3/urllib/robotparser.pyi @@ -0,0 +1,7 @@ +class RobotFileParser: + def set_url(self, url: str): ... + def read(self): ... + def parse(self, lines: str): ... + def can_fetch(self, user_agent: str, url: str): ... + def mtime(self): ... + def modified(self): ... From 70eb00d3f2648d8d0157e880d56222adcb71bff3 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 15:13:45 -0800 Subject: [PATCH 3/7] Fix missing urllib.error ContentTooShortError stub. --- stdlib/3/urllib/error.pyi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/3/urllib/error.pyi b/stdlib/3/urllib/error.pyi index e9730002a..279296400 100644 --- a/stdlib/3/urllib/error.pyi +++ b/stdlib/3/urllib/error.pyi @@ -1,6 +1,5 @@ # Stubs for urllib.error -# NOTE: These are incomplete! - class URLError(IOError): ... class HTTPError(URLError): ... +class ContentTooShortError(URLError): ... From 9e62b7df06dd7c2469f1c9dd2ebd51537e599a2b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 15:28:26 -0800 Subject: [PATCH 4/7] Add urllib.response stub for Python 3. --- stdlib/3/urllib/response.pyi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 stdlib/3/urllib/response.pyi diff --git a/stdlib/3/urllib/response.pyi b/stdlib/3/urllib/response.pyi new file mode 100644 index 000000000..20b01ea75 --- /dev/null +++ b/stdlib/3/urllib/response.pyi @@ -0,0 +1,32 @@ +from typing import Any + +class addbase: + fp = ... # type: Any + read = ... # type: Any + readline = ... # type: Any + readlines = ... # type: Any + fileno = ... # type: Any + __iter__ = ... # type: Any + next = ... # type: Any + def __init__(self, fp) -> None: ... + def close(self): ... + +class addclosehook(addbase): + closehook = ... # type: Any + hookargs = ... # type: Any + def __init__(self, fp, closehook, *hookargs) -> None: ... + def close(self): ... + +class addinfo(addbase): + headers = ... # type: Any + def __init__(self, fp, headers) -> None: ... + def info(self): ... + +class addinfourl(addbase): + headers = ... # type: Any + url = ... # type: Any + code = ... # type: Any + def __init__(self, fp, headers, url, code=...) -> None: ... + def info(self): ... + def getcode(self): ... + def geturl(self): ... From 8f3f56d07fda214b11b51586d6a05ae76e7342e4 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 15:22:24 -0800 Subject: [PATCH 5/7] Add some missing python 3 urllib.parse stubs. --- stdlib/3/urllib/parse.pyi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stdlib/3/urllib/parse.pyi b/stdlib/3/urllib/parse.pyi index 10dae46fc..1a453dcc9 100644 --- a/stdlib/3/urllib/parse.pyi +++ b/stdlib/3/urllib/parse.pyi @@ -19,6 +19,14 @@ __all__ = ( 'unquote_to_bytes' ) +uses_relative = [] # type: List[str] +uses_netloc = [] # type: List[str] +uses_params = [] # type: List[str] +non_hierarchical = [] # type: List[str] +uses_query = [] # type: List[str] +uses_fragment = [] # type: List[str] +scheme_chars = ... # type: str +MAX_CACHE_SIZE = 0 class _ResultMixinBase(Generic[AnyStr]): def geturl(self) -> AnyStr: ... @@ -90,6 +98,8 @@ def unquote(string: str, encoding: str = ..., errors: str = ...) -> str: ... def unquote_to_bytes(string: AnyStr) -> bytes: ... +def unquote_plus(string: str, encoding: str = ..., errors: str = ...) -> str: ... + @overload def urldefrag(url: str) -> DefragResult: ... @overload From bcdec9043d425706b131161f8ce605dba9598e9d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 12:47:16 -0800 Subject: [PATCH 6/7] Redo six.moves to be implemented purely using imports. Based on https://github.com/python/typeshed/pull/21. --- third_party/2.7/six/moves/__init__.pyi | 42 ++++++++++++------------ third_party/2.7/six/moves/cPickle.pyi | 6 ++++ third_party/3/six/moves/__init__.pyi | 45 +++++++++++++------------- third_party/3/six/moves/cPickle.pyi | 6 ++++ 4 files changed, 55 insertions(+), 44 deletions(-) create mode 100644 third_party/2.7/six/moves/cPickle.pyi create mode 100644 third_party/3/six/moves/cPickle.pyi diff --git a/third_party/2.7/six/moves/__init__.pyi b/third_party/2.7/six/moves/__init__.pyi index 790253e09..0543fb24e 100644 --- a/third_party/2.7/six/moves/__init__.pyi +++ b/third_party/2.7/six/moves/__init__.pyi @@ -1,24 +1,22 @@ # Provisional stubs for six.moves (Python 2.7) -from typing import overload, TypeVar, Tuple, Iterable, Iterator - -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') - -@overload -def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], - iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], - iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, - _T3, _T4]]: ... # TODO more than four iterables - -# For re-export. -import cStringIO as cStringIO -import cPickle as cPickle +from cStringIO import StringIO as cStringIO +from itertools import ifilter as filter +from itertools import ifilterfalse as filterfalse +from __builtin__ import raw_input as input +from __builtin__ import intern as intern +from itertools import imap as map +from os import getcwdu as getcwd +from os import getcwd as getcwdb +from __builtin__ import xrange as range +from __builtin__ import reload as reload_module +from __builtin__ import reduce as reduce +from pipes import quote as shlex_quote +from StringIO import StringIO as StringIO +from UserDict import UserDict as UserDict +from UserList import UserList as UserList +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 diff --git a/third_party/2.7/six/moves/cPickle.pyi b/third_party/2.7/six/moves/cPickle.pyi new file mode 100644 index 000000000..a3c341476 --- /dev/null +++ b/third_party/2.7/six/moves/cPickle.pyi @@ -0,0 +1,6 @@ +# 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 * diff --git a/third_party/3/six/moves/__init__.pyi b/third_party/3/six/moves/__init__.pyi index b0cc062ba..ee55856f1 100644 --- a/third_party/3/six/moves/__init__.pyi +++ b/third_party/3/six/moves/__init__.pyi @@ -1,24 +1,25 @@ -# Provisional stubs for six.moves (Python 2.7) +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# Stubs for six.moves (Python 3.2) -from typing import overload, TypeVar, Tuple, Iterable, Iterator - -_T1 = TypeVar('_T1') -_T2 = TypeVar('_T2') -_T3 = TypeVar('_T3') -_T4 = TypeVar('_T4') - -@overload -def zip(iter1: Iterable[_T1]) -> Iterator[Tuple[_T1]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2]) -> Iterator[Tuple[_T1, _T2]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], - iter3: Iterable[_T3]) -> Iterator[Tuple[_T1, _T2, _T3]]: ... -@overload -def zip(iter1: Iterable[_T1], iter2: Iterable[_T2], iter3: Iterable[_T3], - iter4: Iterable[_T4]) -> Iterator[Tuple[_T1, _T2, - _T3, _T4]]: ... # TODO more than four iterables - -# For re-export. from io import StringIO as cStringIO -import pickle as cPickle +from builtins import filter as filter +from itertools import filterfalse as filterfalse +from builtins import input as input +from sys import intern as intern +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 +# from collections import UserDict as UserDict +# from collections import UserList as UserList +# 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 diff --git a/third_party/3/six/moves/cPickle.pyi b/third_party/3/six/moves/cPickle.pyi new file mode 100644 index 000000000..aa9f2bc80 --- /dev/null +++ b/third_party/3/six/moves/cPickle.pyi @@ -0,0 +1,6 @@ +# 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 * From 11e179501addc5b7a2f32d48f777c5a8adbe635d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 26 Jan 2016 12:49:32 -0800 Subject: [PATCH 7/7] Add six.moves.urllib stubs using imports. Based on https://github.com/python/typeshed/pull/21. --- third_party/2.7/six/moves/__init__.pyi | 5 +++ third_party/2.7/six/moves/urllib/__init__.pyi | 10 +++++ third_party/2.7/six/moves/urllib/error.pyi | 8 ++++ third_party/2.7/six/moves/urllib/parse.pyi | 30 ++++++++++++++ third_party/2.7/six/moves/urllib/request.pyi | 39 ++++++++++++++++++ third_party/2.7/six/moves/urllib/response.pyi | 9 ++++ .../2.7/six/moves/urllib/robotparser.pyi | 6 +++ third_party/2.7/six/moves/urllib_error.pyi | 10 +++++ third_party/2.7/six/moves/urllib_parse.pyi | 28 +++++++++++++ third_party/2.7/six/moves/urllib_request.pyi | 40 ++++++++++++++++++ third_party/2.7/six/moves/urllib_response.pyi | 11 +++++ .../2.7/six/moves/urllib_robotparser.pyi | 8 ++++ third_party/3/six/moves/__init__.pyi | 5 +++ third_party/3/six/moves/urllib/__init__.pyi | 10 +++++ third_party/3/six/moves/urllib/error.pyi | 8 ++++ third_party/3/six/moves/urllib/parse.pyi | 22 ++++++++++ third_party/3/six/moves/urllib/request.pyi | 40 ++++++++++++++++++ third_party/3/six/moves/urllib/response.pyi | 9 ++++ .../3/six/moves/urllib/robotparser.pyi | 6 +++ 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 | 11 +++++ .../3/six/moves/urllib_robotparser.pyi | 8 ++++ 24 files changed, 394 insertions(+) create mode 100644 third_party/2.7/six/moves/urllib/__init__.pyi create mode 100644 third_party/2.7/six/moves/urllib/error.pyi create mode 100644 third_party/2.7/six/moves/urllib/parse.pyi create mode 100644 third_party/2.7/six/moves/urllib/request.pyi create mode 100644 third_party/2.7/six/moves/urllib/response.pyi create mode 100644 third_party/2.7/six/moves/urllib/robotparser.pyi create mode 100644 third_party/2.7/six/moves/urllib_error.pyi create mode 100644 third_party/2.7/six/moves/urllib_parse.pyi create mode 100644 third_party/2.7/six/moves/urllib_request.pyi create mode 100644 third_party/2.7/six/moves/urllib_response.pyi create mode 100644 third_party/2.7/six/moves/urllib_robotparser.pyi create mode 100644 third_party/3/six/moves/urllib/__init__.pyi create mode 100644 third_party/3/six/moves/urllib/error.pyi create mode 100644 third_party/3/six/moves/urllib/parse.pyi create mode 100644 third_party/3/six/moves/urllib/request.pyi create mode 100644 third_party/3/six/moves/urllib/response.pyi create mode 100644 third_party/3/six/moves/urllib/robotparser.pyi create mode 100644 third_party/3/six/moves/urllib_error.pyi create mode 100644 third_party/3/six/moves/urllib_parse.pyi create mode 100644 third_party/3/six/moves/urllib_request.pyi create mode 100644 third_party/3/six/moves/urllib_response.pyi create mode 100644 third_party/3/six/moves/urllib_robotparser.pyi diff --git a/third_party/2.7/six/moves/__init__.pyi b/third_party/2.7/six/moves/__init__.pyi index 0543fb24e..aef863dec 100644 --- a/third_party/2.7/six/moves/__init__.pyi +++ b/third_party/2.7/six/moves/__init__.pyi @@ -20,3 +20,8 @@ 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 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 diff --git a/third_party/2.7/six/moves/urllib/__init__.pyi b/third_party/2.7/six/moves/urllib/__init__.pyi new file mode 100644 index 000000000..71523cda7 --- /dev/null +++ b/third_party/2.7/six/moves/urllib/__init__.pyi @@ -0,0 +1,10 @@ +# 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 +import six.moves.urllib.response as response +import six.moves.urllib.robotparser as robotparser diff --git a/third_party/2.7/six/moves/urllib/error.pyi b/third_party/2.7/six/moves/urllib/error.pyi new file mode 100644 index 000000000..05eda84a7 --- /dev/null +++ b/third_party/2.7/six/moves/urllib/error.pyi @@ -0,0 +1,8 @@ +# 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.7/six/moves/urllib/parse.pyi b/third_party/2.7/six/moves/urllib/parse.pyi new file mode 100644 index 000000000..25351fb86 --- /dev/null +++ b/third_party/2.7/six/moves/urllib/parse.pyi @@ -0,0 +1,30 @@ +# 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, +) diff --git a/third_party/2.7/six/moves/urllib/request.pyi b/third_party/2.7/six/moves/urllib/request.pyi new file mode 100644 index 000000000..8c8a8b7df --- /dev/null +++ b/third_party/2.7/six/moves/urllib/request.pyi @@ -0,0 +1,39 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# Stubs for six.moves.urllib.request (Python 2.7) + +from urllib2 import urlopen as urlopen +from urllib2 import install_opener as install_opener +from urllib2 import build_opener as build_opener +from urllib import pathname2url as pathname2url +from urllib import url2pathname as url2pathname +from urllib import getproxies as getproxies +from urllib2 import Request as Request +from urllib2 import OpenerDirector as OpenerDirector +from urllib2 import HTTPDefaultErrorHandler as HTTPDefaultErrorHandler +from urllib2 import HTTPRedirectHandler as HTTPRedirectHandler +from urllib2 import HTTPCookieProcessor as HTTPCookieProcessor +from urllib2 import ProxyHandler as ProxyHandler +from urllib2 import BaseHandler as BaseHandler +from urllib2 import HTTPPasswordMgr as HTTPPasswordMgr +from urllib2 import HTTPPasswordMgrWithDefaultRealm as HTTPPasswordMgrWithDefaultRealm +from urllib2 import AbstractBasicAuthHandler as AbstractBasicAuthHandler +from urllib2 import HTTPBasicAuthHandler as HTTPBasicAuthHandler +from urllib2 import ProxyBasicAuthHandler as ProxyBasicAuthHandler +from urllib2 import AbstractDigestAuthHandler as AbstractDigestAuthHandler +from urllib2 import HTTPDigestAuthHandler as HTTPDigestAuthHandler +from urllib2 import ProxyDigestAuthHandler as ProxyDigestAuthHandler +from urllib2 import HTTPHandler as HTTPHandler +from urllib2 import HTTPSHandler as HTTPSHandler +from urllib2 import FileHandler as FileHandler +from urllib2 import FTPHandler as FTPHandler +from urllib2 import CacheFTPHandler as CacheFTPHandler +from urllib2 import UnknownHandler as UnknownHandler +from urllib2 import HTTPErrorProcessor as HTTPErrorProcessor +from urllib import urlretrieve as urlretrieve +from urllib import urlcleanup as urlcleanup +from urllib import URLopener as URLopener +from urllib import FancyURLopener as FancyURLopener +# Don't have type stubs for proxy_bypass in stdlib urllib +# from urllib import proxy_bypass as proxy_bypass diff --git a/third_party/2.7/six/moves/urllib/response.pyi b/third_party/2.7/six/moves/urllib/response.pyi new file mode 100644 index 000000000..d778514d0 --- /dev/null +++ b/third_party/2.7/six/moves/urllib/response.pyi @@ -0,0 +1,9 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# Stubs for six.moves.urllib.response (Python 2.7) + +from urllib import addbase as addbase +from urllib import addclosehook as addclosehook +from urllib import addinfo as addinfo +from urllib import addinfourl as addinfourl diff --git a/third_party/2.7/six/moves/urllib/robotparser.pyi b/third_party/2.7/six/moves/urllib/robotparser.pyi new file mode 100644 index 000000000..3b337585f --- /dev/null +++ b/third_party/2.7/six/moves/urllib/robotparser.pyi @@ -0,0 +1,6 @@ +# 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.7/six/moves/urllib_error.pyi b/third_party/2.7/six/moves/urllib_error.pyi new file mode 100644 index 000000000..4872659b0 --- /dev/null +++ b/third_party/2.7/six/moves/urllib_error.pyi @@ -0,0 +1,10 @@ +# 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.7/six/moves/urllib_parse.pyi b/third_party/2.7/six/moves/urllib_parse.pyi new file mode 100644 index 000000000..2416b9642 --- /dev/null +++ b/third_party/2.7/six/moves/urllib_parse.pyi @@ -0,0 +1,28 @@ +# 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.7/six/moves/urllib_request.pyi b/third_party/2.7/six/moves/urllib_request.pyi new file mode 100644 index 000000000..832055a07 --- /dev/null +++ b/third_party/2.7/six/moves/urllib_request.pyi @@ -0,0 +1,40 @@ +# 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.7/six/moves/urllib_response.pyi b/third_party/2.7/six/moves/urllib_response.pyi new file mode 100644 index 000000000..ca0049255 --- /dev/null +++ b/third_party/2.7/six/moves/urllib_response.pyi @@ -0,0 +1,11 @@ +# 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.7/six/moves/urllib_robotparser.pyi b/third_party/2.7/six/moves/urllib_robotparser.pyi new file mode 100644 index 000000000..d990bb554 --- /dev/null +++ b/third_party/2.7/six/moves/urllib_robotparser.pyi @@ -0,0 +1,8 @@ +# 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 ee55856f1..00dedd754 100644 --- a/third_party/3/six/moves/__init__.pyi +++ b/third_party/3/six/moves/__init__.pyi @@ -23,3 +23,8 @@ 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 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 diff --git a/third_party/3/six/moves/urllib/__init__.pyi b/third_party/3/six/moves/urllib/__init__.pyi new file mode 100644 index 000000000..298b0495e --- /dev/null +++ b/third_party/3/six/moves/urllib/__init__.pyi @@ -0,0 +1,10 @@ +# 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 +import six.moves.urllib.response as response +import six.moves.urllib.robotparser as robotparser diff --git a/third_party/3/six/moves/urllib/error.pyi b/third_party/3/six/moves/urllib/error.pyi new file mode 100644 index 000000000..a45b0f71e --- /dev/null +++ b/third_party/3/six/moves/urllib/error.pyi @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000..c640af258 --- /dev/null +++ b/third_party/3/six/moves/urllib/parse.pyi @@ -0,0 +1,22 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# 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, +) diff --git a/third_party/3/six/moves/urllib/request.pyi b/third_party/3/six/moves/urllib/request.pyi new file mode 100644 index 000000000..b15ced7ea --- /dev/null +++ b/third_party/3/six/moves/urllib/request.pyi @@ -0,0 +1,40 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# 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 + +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 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 new file mode 100644 index 000000000..93ec5ce62 --- /dev/null +++ b/third_party/3/six/moves/urllib/response.pyi @@ -0,0 +1,9 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# Stubs for six.moves.urllib.response (Python 3.2) + +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 new file mode 100644 index 000000000..669035523 --- /dev/null +++ b/third_party/3/six/moves/urllib/robotparser.pyi @@ -0,0 +1,6 @@ +# 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 new file mode 100644 index 000000000..136866442 --- /dev/null +++ b/third_party/3/six/moves/urllib_error.pyi @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 000000000..96f6207ef --- /dev/null +++ b/third_party/3/six/moves/urllib_parse.pyi @@ -0,0 +1,20 @@ +# 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 new file mode 100644 index 000000000..168f63532 --- /dev/null +++ b/third_party/3/six/moves/urllib_request.pyi @@ -0,0 +1,41 @@ +# 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 new file mode 100644 index 000000000..0a834a7f0 --- /dev/null +++ b/third_party/3/six/moves/urllib_response.pyi @@ -0,0 +1,11 @@ +# Generated by stubtool 0.1, DO NOT EDIT +# See https://github.com/o11c/stubtool +# +# Stubs for six.moves.urllib_response (Python 3.2) + +from six.moves.urllib.response import ( + addbase as addbase, + addclosehook as addclosehook, + addinfo as addinfo, + addinfourl as addinfourl, +) diff --git a/third_party/3/six/moves/urllib_robotparser.pyi b/third_party/3/six/moves/urllib_robotparser.pyi new file mode 100644 index 000000000..8b4ca73e4 --- /dev/null +++ b/third_party/3/six/moves/urllib_robotparser.pyi @@ -0,0 +1,8 @@ +# 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, +)