mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Add future 0.18.2
This commit is contained in:
parent
08c8ee0774
commit
fa97d3f88d
210 changed files with 43159 additions and 0 deletions
8
lib/future/moves/__init__.py
Normal file
8
lib/future/moves/__init__.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
# future.moves package
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
__future_module__ = True
|
||||
from future.standard_library import import_top_level_modules
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
import_top_level_modules()
|
8
lib/future/moves/_dummy_thread.py
Normal file
8
lib/future/moves/_dummy_thread.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from _dummy_thread import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from dummy_thread import *
|
8
lib/future/moves/_markupbase.py
Normal file
8
lib/future/moves/_markupbase.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from _markupbase import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from markupbase import *
|
8
lib/future/moves/_thread.py
Normal file
8
lib/future/moves/_thread.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from _thread import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from thread import *
|
10
lib/future/moves/builtins.py
Normal file
10
lib/future/moves/builtins.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from builtins import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from __builtin__ import *
|
||||
# Overwrite any old definitions with the equivalent future.builtins ones:
|
||||
from future.builtins import *
|
18
lib/future/moves/collections.py
Normal file
18
lib/future/moves/collections.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from __future__ import absolute_import
|
||||
import sys
|
||||
|
||||
from future.utils import PY2, PY26
|
||||
__future_module__ = True
|
||||
|
||||
from collections import *
|
||||
|
||||
if PY2:
|
||||
from UserDict import UserDict
|
||||
from UserList import UserList
|
||||
from UserString import UserString
|
||||
|
||||
if PY26:
|
||||
from future.backports.misc import OrderedDict, Counter
|
||||
|
||||
if sys.version_info < (3, 3):
|
||||
from future.backports.misc import ChainMap, _count_elements
|
8
lib/future/moves/configparser.py
Normal file
8
lib/future/moves/configparser.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY2
|
||||
|
||||
if PY2:
|
||||
from ConfigParser import *
|
||||
else:
|
||||
from configparser import *
|
12
lib/future/moves/copyreg.py
Normal file
12
lib/future/moves/copyreg.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
import copyreg, sys
|
||||
# A "*" import uses Python 3's copyreg.__all__ which does not include
|
||||
# all public names in the API surface for copyreg, this avoids that
|
||||
# problem by just making our module _be_ a reference to the actual module.
|
||||
sys.modules['future.moves.copyreg'] = copyreg
|
||||
else:
|
||||
__future_module__ = True
|
||||
from copy_reg import *
|
20
lib/future/moves/dbm/__init__.py
Normal file
20
lib/future/moves/dbm/__init__.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from dbm import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from whichdb import *
|
||||
from anydbm import *
|
||||
|
||||
# Py3.3's dbm/__init__.py imports ndbm but doesn't expose it via __all__.
|
||||
# In case some (badly written) code depends on dbm.ndbm after import dbm,
|
||||
# we simulate this:
|
||||
if PY3:
|
||||
from dbm import ndbm
|
||||
else:
|
||||
try:
|
||||
from future.moves.dbm import ndbm
|
||||
except ImportError:
|
||||
ndbm = None
|
9
lib/future/moves/dbm/dumb.py
Normal file
9
lib/future/moves/dbm/dumb.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from dbm.dumb import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from dumbdbm import *
|
9
lib/future/moves/dbm/gnu.py
Normal file
9
lib/future/moves/dbm/gnu.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from dbm.gnu import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from gdbm import *
|
9
lib/future/moves/dbm/ndbm.py
Normal file
9
lib/future/moves/dbm/ndbm.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from dbm.ndbm import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from dbm import *
|
31
lib/future/moves/html/__init__.py
Normal file
31
lib/future/moves/html/__init__.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
__future_module__ = True
|
||||
|
||||
if PY3:
|
||||
from html import *
|
||||
else:
|
||||
# cgi.escape isn't good enough for the single Py3.3 html test to pass.
|
||||
# Define it inline here instead. From the Py3.4 stdlib. Note that the
|
||||
# html.escape() function from the Py3.3 stdlib is not suitable for use on
|
||||
# Py2.x.
|
||||
"""
|
||||
General functions for HTML manipulation.
|
||||
"""
|
||||
|
||||
def escape(s, quote=True):
|
||||
"""
|
||||
Replace special characters "&", "<" and ">" to HTML-safe sequences.
|
||||
If the optional flag quote is true (the default), the quotation mark
|
||||
characters, both double quote (") and single quote (') characters are also
|
||||
translated.
|
||||
"""
|
||||
s = s.replace("&", "&") # Must be done first!
|
||||
s = s.replace("<", "<")
|
||||
s = s.replace(">", ">")
|
||||
if quote:
|
||||
s = s.replace('"', """)
|
||||
s = s.replace('\'', "'")
|
||||
return s
|
||||
|
||||
__all__ = ['escape']
|
8
lib/future/moves/html/entities.py
Normal file
8
lib/future/moves/html/entities.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from html.entities import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from htmlentitydefs import *
|
8
lib/future/moves/html/parser.py
Normal file
8
lib/future/moves/html/parser.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
__future_module__ = True
|
||||
|
||||
if PY3:
|
||||
from html.parser import *
|
||||
else:
|
||||
from HTMLParser import *
|
4
lib/future/moves/http/__init__.py
Normal file
4
lib/future/moves/http/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from future.utils import PY3
|
||||
|
||||
if not PY3:
|
||||
__future_module__ = True
|
8
lib/future/moves/http/client.py
Normal file
8
lib/future/moves/http/client.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from http.client import *
|
||||
else:
|
||||
from httplib import *
|
||||
from httplib import HTTPMessage
|
||||
__future_module__ = True
|
8
lib/future/moves/http/cookiejar.py
Normal file
8
lib/future/moves/http/cookiejar.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from http.cookiejar import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from cookielib import *
|
9
lib/future/moves/http/cookies.py
Normal file
9
lib/future/moves/http/cookies.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from http.cookies import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from Cookie import *
|
||||
from Cookie import Morsel # left out of __all__ on Py2.7!
|
20
lib/future/moves/http/server.py
Normal file
20
lib/future/moves/http/server.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from http.server import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from BaseHTTPServer import *
|
||||
from CGIHTTPServer import *
|
||||
from SimpleHTTPServer import *
|
||||
try:
|
||||
from CGIHTTPServer import _url_collapse_path # needed for a test
|
||||
except ImportError:
|
||||
try:
|
||||
# Python 2.7.0 to 2.7.3
|
||||
from CGIHTTPServer import (
|
||||
_url_collapse_path_split as _url_collapse_path)
|
||||
except ImportError:
|
||||
# Doesn't exist on Python 2.6.x. Ignore it.
|
||||
pass
|
8
lib/future/moves/itertools.py
Normal file
8
lib/future/moves/itertools.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from itertools import *
|
||||
try:
|
||||
zip_longest = izip_longest
|
||||
filterfalse = ifilterfalse
|
||||
except NameError:
|
||||
pass
|
11
lib/future/moves/pickle.py
Normal file
11
lib/future/moves/pickle.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from pickle import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
try:
|
||||
from cPickle import *
|
||||
except ImportError:
|
||||
from pickle import *
|
8
lib/future/moves/queue.py
Normal file
8
lib/future/moves/queue.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from queue import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from Queue import *
|
8
lib/future/moves/reprlib.py
Normal file
8
lib/future/moves/reprlib.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from reprlib import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from repr import *
|
8
lib/future/moves/socketserver.py
Normal file
8
lib/future/moves/socketserver.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from socketserver import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from SocketServer import *
|
11
lib/future/moves/subprocess.py
Normal file
11
lib/future/moves/subprocess.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY2, PY26
|
||||
|
||||
from subprocess import *
|
||||
|
||||
if PY2:
|
||||
__future_module__ = True
|
||||
from commands import getoutput, getstatusoutput
|
||||
|
||||
if PY26:
|
||||
from future.backports.misc import check_output
|
8
lib/future/moves/sys.py
Normal file
8
lib/future/moves/sys.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY2
|
||||
|
||||
from sys import *
|
||||
|
||||
if PY2:
|
||||
from __builtin__ import intern
|
5
lib/future/moves/test/__init__.py
Normal file
5
lib/future/moves/test/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if not PY3:
|
||||
__future_module__ = True
|
10
lib/future/moves/test/support.py
Normal file
10
lib/future/moves/test/support.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from __future__ import absolute_import
|
||||
from future.standard_library import suspend_hooks
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from test.support import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
with suspend_hooks():
|
||||
from test.test_support import *
|
27
lib/future/moves/tkinter/__init__.py
Normal file
27
lib/future/moves/tkinter/__init__.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
__future_module__ = True
|
||||
|
||||
if not PY3:
|
||||
from Tkinter import *
|
||||
from Tkinter import (_cnfmerge, _default_root, _flatten,
|
||||
_support_default_root, _test,
|
||||
_tkinter, _setit)
|
||||
|
||||
try: # >= 2.7.4
|
||||
from Tkinter import (_join)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try: # >= 2.7.4
|
||||
from Tkinter import (_stringify)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try: # >= 2.7.9
|
||||
from Tkinter import (_splitdict)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
else:
|
||||
from tkinter import *
|
12
lib/future/moves/tkinter/colorchooser.py
Normal file
12
lib/future/moves/tkinter/colorchooser.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.colorchooser import *
|
||||
else:
|
||||
try:
|
||||
from tkColorChooser import *
|
||||
except ImportError:
|
||||
raise ImportError('The tkColorChooser module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/commondialog.py
Normal file
12
lib/future/moves/tkinter/commondialog.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.commondialog import *
|
||||
else:
|
||||
try:
|
||||
from tkCommonDialog import *
|
||||
except ImportError:
|
||||
raise ImportError('The tkCommonDialog module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/constants.py
Normal file
12
lib/future/moves/tkinter/constants.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.constants import *
|
||||
else:
|
||||
try:
|
||||
from Tkconstants import *
|
||||
except ImportError:
|
||||
raise ImportError('The Tkconstants module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/dialog.py
Normal file
12
lib/future/moves/tkinter/dialog.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.dialog import *
|
||||
else:
|
||||
try:
|
||||
from Dialog import *
|
||||
except ImportError:
|
||||
raise ImportError('The Dialog module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/dnd.py
Normal file
12
lib/future/moves/tkinter/dnd.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.dnd import *
|
||||
else:
|
||||
try:
|
||||
from Tkdnd import *
|
||||
except ImportError:
|
||||
raise ImportError('The Tkdnd module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/filedialog.py
Normal file
12
lib/future/moves/tkinter/filedialog.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.filedialog import *
|
||||
else:
|
||||
try:
|
||||
from FileDialog import *
|
||||
except ImportError:
|
||||
raise ImportError('The FileDialog module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/font.py
Normal file
12
lib/future/moves/tkinter/font.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.font import *
|
||||
else:
|
||||
try:
|
||||
from tkFont import *
|
||||
except ImportError:
|
||||
raise ImportError('The tkFont module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/messagebox.py
Normal file
12
lib/future/moves/tkinter/messagebox.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.messagebox import *
|
||||
else:
|
||||
try:
|
||||
from tkMessageBox import *
|
||||
except ImportError:
|
||||
raise ImportError('The tkMessageBox module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/scrolledtext.py
Normal file
12
lib/future/moves/tkinter/scrolledtext.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.scrolledtext import *
|
||||
else:
|
||||
try:
|
||||
from ScrolledText import *
|
||||
except ImportError:
|
||||
raise ImportError('The ScrolledText module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/simpledialog.py
Normal file
12
lib/future/moves/tkinter/simpledialog.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.simpledialog import *
|
||||
else:
|
||||
try:
|
||||
from SimpleDialog import *
|
||||
except ImportError:
|
||||
raise ImportError('The SimpleDialog module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/tix.py
Normal file
12
lib/future/moves/tkinter/tix.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.tix import *
|
||||
else:
|
||||
try:
|
||||
from Tix import *
|
||||
except ImportError:
|
||||
raise ImportError('The Tix module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
12
lib/future/moves/tkinter/ttk.py
Normal file
12
lib/future/moves/tkinter/ttk.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from tkinter.ttk import *
|
||||
else:
|
||||
try:
|
||||
from ttk import *
|
||||
except ImportError:
|
||||
raise ImportError('The ttk module is missing. Does your Py2 '
|
||||
'installation include tkinter?')
|
5
lib/future/moves/urllib/__init__.py
Normal file
5
lib/future/moves/urllib/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if not PY3:
|
||||
__future_module__ = True
|
16
lib/future/moves/urllib/error.py
Normal file
16
lib/future/moves/urllib/error.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from __future__ import absolute_import
|
||||
from future.standard_library import suspend_hooks
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from urllib.error import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
|
||||
# We use this method to get at the original Py2 urllib before any renaming magic
|
||||
# ContentTooShortError = sys.py2_modules['urllib'].ContentTooShortError
|
||||
|
||||
with suspend_hooks():
|
||||
from urllib import ContentTooShortError
|
||||
from urllib2 import URLError, HTTPError
|
28
lib/future/moves/urllib/parse.py
Normal file
28
lib/future/moves/urllib/parse.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from __future__ import absolute_import
|
||||
from future.standard_library import suspend_hooks
|
||||
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from urllib.parse import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from urlparse import (ParseResult, SplitResult, parse_qs, parse_qsl,
|
||||
urldefrag, urljoin, urlparse, urlsplit,
|
||||
urlunparse, urlunsplit)
|
||||
|
||||
# we use this method to get at the original py2 urllib before any renaming
|
||||
# quote = sys.py2_modules['urllib'].quote
|
||||
# quote_plus = sys.py2_modules['urllib'].quote_plus
|
||||
# unquote = sys.py2_modules['urllib'].unquote
|
||||
# unquote_plus = sys.py2_modules['urllib'].unquote_plus
|
||||
# urlencode = sys.py2_modules['urllib'].urlencode
|
||||
# splitquery = sys.py2_modules['urllib'].splitquery
|
||||
|
||||
with suspend_hooks():
|
||||
from urllib import (quote,
|
||||
quote_plus,
|
||||
unquote,
|
||||
unquote_plus,
|
||||
urlencode,
|
||||
splitquery)
|
94
lib/future/moves/urllib/request.py
Normal file
94
lib/future/moves/urllib/request.py
Normal file
|
@ -0,0 +1,94 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from future.standard_library import suspend_hooks
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from urllib.request import *
|
||||
# This aren't in __all__:
|
||||
from urllib.request import (getproxies,
|
||||
pathname2url,
|
||||
proxy_bypass,
|
||||
quote,
|
||||
request_host,
|
||||
thishost,
|
||||
unquote,
|
||||
url2pathname,
|
||||
urlcleanup,
|
||||
urljoin,
|
||||
urlopen,
|
||||
urlparse,
|
||||
urlretrieve,
|
||||
urlsplit,
|
||||
urlunparse)
|
||||
|
||||
from urllib.parse import (splitattr,
|
||||
splithost,
|
||||
splitpasswd,
|
||||
splitport,
|
||||
splitquery,
|
||||
splittag,
|
||||
splittype,
|
||||
splituser,
|
||||
splitvalue,
|
||||
to_bytes,
|
||||
unwrap)
|
||||
else:
|
||||
__future_module__ = True
|
||||
with suspend_hooks():
|
||||
from urllib import *
|
||||
from urllib2 import *
|
||||
from urlparse import *
|
||||
|
||||
# Rename:
|
||||
from urllib import toBytes # missing from __all__ on Py2.6
|
||||
to_bytes = toBytes
|
||||
|
||||
# from urllib import (pathname2url,
|
||||
# url2pathname,
|
||||
# getproxies,
|
||||
# urlretrieve,
|
||||
# urlcleanup,
|
||||
# URLopener,
|
||||
# FancyURLopener,
|
||||
# proxy_bypass)
|
||||
|
||||
# from urllib2 import (
|
||||
# AbstractBasicAuthHandler,
|
||||
# AbstractDigestAuthHandler,
|
||||
# BaseHandler,
|
||||
# CacheFTPHandler,
|
||||
# FileHandler,
|
||||
# FTPHandler,
|
||||
# HTTPBasicAuthHandler,
|
||||
# HTTPCookieProcessor,
|
||||
# HTTPDefaultErrorHandler,
|
||||
# HTTPDigestAuthHandler,
|
||||
# HTTPErrorProcessor,
|
||||
# HTTPHandler,
|
||||
# HTTPPasswordMgr,
|
||||
# HTTPPasswordMgrWithDefaultRealm,
|
||||
# HTTPRedirectHandler,
|
||||
# HTTPSHandler,
|
||||
# URLError,
|
||||
# build_opener,
|
||||
# install_opener,
|
||||
# OpenerDirector,
|
||||
# ProxyBasicAuthHandler,
|
||||
# ProxyDigestAuthHandler,
|
||||
# ProxyHandler,
|
||||
# Request,
|
||||
# UnknownHandler,
|
||||
# urlopen,
|
||||
# )
|
||||
|
||||
# from urlparse import (
|
||||
# urldefrag
|
||||
# urljoin,
|
||||
# urlparse,
|
||||
# urlunparse,
|
||||
# urlsplit,
|
||||
# urlunsplit,
|
||||
# parse_qs,
|
||||
# parse_q"
|
||||
# )
|
12
lib/future/moves/urllib/response.py
Normal file
12
lib/future/moves/urllib/response.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from future import standard_library
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from urllib.response import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
with standard_library.suspend_hooks():
|
||||
from urllib import (addbase,
|
||||
addclosehook,
|
||||
addinfo,
|
||||
addinfourl)
|
8
lib/future/moves/urllib/robotparser.py
Normal file
8
lib/future/moves/urllib/robotparser.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from urllib.robotparser import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from robotparser import *
|
8
lib/future/moves/winreg.py
Normal file
8
lib/future/moves/winreg.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from winreg import *
|
||||
else:
|
||||
__future_module__ = True
|
||||
from _winreg import *
|
0
lib/future/moves/xmlrpc/__init__.py
Normal file
0
lib/future/moves/xmlrpc/__init__.py
Normal file
7
lib/future/moves/xmlrpc/client.py
Normal file
7
lib/future/moves/xmlrpc/client.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from xmlrpc.client import *
|
||||
else:
|
||||
from xmlrpclib import *
|
7
lib/future/moves/xmlrpc/server.py
Normal file
7
lib/future/moves/xmlrpc/server.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
from future.utils import PY3
|
||||
|
||||
if PY3:
|
||||
from xmlrpc.server import *
|
||||
else:
|
||||
from xmlrpclib import *
|
Loading…
Add table
Add a link
Reference in a new issue