Add http_client to six.moves, add missing functions to urllib2 fix some types in gettext (#262)

This commit is contained in:
David Euresti
2016-06-04 12:02:55 -07:00
committed by Guido van Rossum
parent 49000ccc5e
commit 0bfa0636e1
4 changed files with 8 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ class Translations(object):
def ugettext(self, message: str) -> unicode: ...
def ngettext(self, singular: str, plural: str, n: int) -> str: ...
def lngettext(self, singular: str, plural: str, n: int) -> str: ...
def ungettext(self, singular: str, plural: str, n: int) -> str: ...
def ungettext(self, singular: str, plural: str, n: int) -> unicode: ...
def info(self) -> Any: ...
def charset(self) -> Any: ...
def output_charset(self) -> Any: ...

View File

@@ -1,4 +1,5 @@
from typing import AnyStr
from urllib import addinfourl
class URLError(IOError): ...
@@ -149,3 +150,6 @@ class CacheFTPHandler(FTPHandler):
def setMaxConns(self, m): ...
def check_cache(self): ...
def clear_cache(self): ...
def parse_http_list(s: AnyStr) -> List[AnyStr] : ...
def parse_keqv_list(l: List[AnyStr]) -> Dict[AnyStr, AnyStr]: ...

View File

@@ -23,8 +23,10 @@ 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 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

View File

@@ -26,6 +26,7 @@ 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 six.moves.urllib_parse as urllib_parse
import six.moves.urllib_error as urllib_error