Add six.moves.urllib stubs using imports.

Based on https://github.com/python/typeshed/pull/21.
This commit is contained in:
Tim Abbott
2016-01-26 20:25:30 -08:00
committed by Tim Abbott
parent bcdec9043d
commit 11e179501a
24 changed files with 394 additions and 0 deletions
+5
View File
@@ -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
+10
View File
@@ -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
+8
View File
@@ -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
+22
View File
@@ -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,
)
+40
View File
@@ -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
+9
View File
@@ -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
+6
View File
@@ -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
+10
View File
@@ -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,
)
+20
View File
@@ -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
+41
View File
@@ -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,
)
+11
View File
@@ -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,
)
+8
View File
@@ -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,
)