mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Implement tree-shaking for Python sources
This commit is contained in:
parent
81287b7ec0
commit
44c87b83ff
110 changed files with 899 additions and 1922 deletions
6
third_party/python/Lib/test/pickletester.py
vendored
6
third_party/python/Lib/test/pickletester.py
vendored
|
@ -1,6 +1,6 @@
|
|||
import collections
|
||||
import copyreg
|
||||
import dbm
|
||||
# import dbm
|
||||
import io
|
||||
import functools
|
||||
import pickle
|
||||
|
@ -979,7 +979,7 @@ class AbstractUnpickleTests(unittest.TestCase):
|
|||
self.assertIs(self.loads(pickled), functools.reduce)
|
||||
# whichdb.whichdb
|
||||
pickled = b'\x80\x02cwhichdb\nwhichdb\n.'
|
||||
self.assertIs(self.loads(pickled), dbm.whichdb)
|
||||
# self.assertIs(self.loads(pickled), dbm.whichdb)
|
||||
# Exception(), StandardError()
|
||||
for name in (b'Exception', b'StandardError'):
|
||||
pickled = (b'\x80\x02cexceptions\n' + name + b'\nU\x03ugh\x85R.')
|
||||
|
@ -2257,7 +2257,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
(range(1, 7), '__builtin__', 'xrange'),
|
||||
(map(int, '123'), 'itertools', 'imap'),
|
||||
(functools.reduce, '__builtin__', 'reduce'),
|
||||
(dbm.whichdb, 'whichdb', 'whichdb'),
|
||||
# (dbm.whichdb, 'whichdb', 'whichdb'),
|
||||
(Exception(), 'exceptions', 'Exception'),
|
||||
(collections.UserDict(), 'UserDict', 'IterableUserDict'),
|
||||
(collections.UserList(), 'UserList', 'UserList'),
|
||||
|
|
5
third_party/python/Lib/test/test_poplib.py
vendored
5
third_party/python/Lib/test/test_poplib.py
vendored
|
@ -19,7 +19,10 @@ PORT = 0
|
|||
|
||||
SUPPORTS_SSL = False
|
||||
if hasattr(poplib, 'POP3_SSL'):
|
||||
import ssl
|
||||
try:
|
||||
import ssl
|
||||
except ImportError:
|
||||
assert False
|
||||
|
||||
SUPPORTS_SSL = True
|
||||
CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir, "keycert3.pem")
|
||||
|
|
|
@ -23,8 +23,8 @@ try:
|
|||
import ctypes
|
||||
except ImportError:
|
||||
ctypes = None
|
||||
else:
|
||||
import ctypes.util
|
||||
# else:
|
||||
# import ctypes.util
|
||||
|
||||
try:
|
||||
import _thread
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue