second commit

This commit is contained in:
2024-12-27 22:31:23 +09:00
parent 2353324570
commit 10a0f110ca
8819 changed files with 1307198 additions and 28 deletions

View 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()

View File

@ -0,0 +1,13 @@
from __future__ import absolute_import
from future.utils import PY3, PY39_PLUS
if PY39_PLUS:
# _dummy_thread and dummy_threading modules were both deprecated in
# Python 3.7 and removed in Python 3.9
from _thread import *
elif PY3:
from _dummy_thread import *
else:
__future_module__ = True
from dummy_thread import *

View 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 *

View 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 *

View 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 *

View 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

View File

@ -0,0 +1,8 @@
from __future__ import absolute_import
from future.utils import PY2
if PY2:
from ConfigParser import *
else:
from configparser import *

View 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 *

View 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

View 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 *

View 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 *

View 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 *

View 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("&", "&amp;") # Must be done first!
s = s.replace("<", "&lt;")
s = s.replace(">", "&gt;")
if quote:
s = s.replace('"', "&quot;")
s = s.replace('\'', "&#x27;")
return s
__all__ = ['escape']

View 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 *

View 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 *

View File

@ -0,0 +1,4 @@
from future.utils import PY3
if not PY3:
__future_module__ = True

View 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

View 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 *

View 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!

View 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

View File

@ -0,0 +1,8 @@
from __future__ import absolute_import
from itertools import *
try:
zip_longest = izip_longest
filterfalse = ifilterfalse
except NameError:
pass

View File

@ -0,0 +1,7 @@
from __future__ import absolute_import
from future.utils import PY3
from multiprocessing import *
if not PY3:
__future_module__ = True
from multiprocessing.queues import SimpleQueue

View 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 *

View 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 *

View 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 *

View 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 *

View 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

View File

@ -0,0 +1,8 @@
from __future__ import absolute_import
from future.utils import PY2
from sys import *
if PY2:
from __builtin__ import intern

View File

@ -0,0 +1,5 @@
from __future__ import absolute_import
from future.utils import PY3
if not PY3:
__future_module__ = True

View File

@ -0,0 +1,19 @@
from __future__ import absolute_import
import sys
from future.standard_library import suspend_hooks
from future.utils import PY3
if PY3:
from test.support import *
if sys.version_info[:2] >= (3, 10):
from test.support.os_helper import (
EnvironmentVarGuard,
TESTFN,
)
from test.support.warnings_helper import check_warnings
else:
__future_module__ = True
with suspend_hooks():
from test.test_support import *

View 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 *

View 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?')

View 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?')

View 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?')

View 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?')

View 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?')

View File

@ -0,0 +1,18 @@
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?')
try:
from tkFileDialog import *
except ImportError:
raise ImportError('The tkFileDialog module is missing. Does your Py2 '
'installation include tkinter?')

View 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?')

View 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?')

View 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?')

View 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?')

View 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?')

View 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?')

View File

@ -0,0 +1,5 @@
from __future__ import absolute_import
from future.utils import PY3
if not PY3:
__future_module__ = True

View 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

View 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)

View 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"
# )

View 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)

View 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 *

View 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 *

Some files were not shown because too many files have changed in this diff Show More